Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 9th, 2003, 08:35 AM
Registered User
 
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Executing from memory

I am new to VB6 I have been challenged by my mentor to create a program that funtions as a calendar. By that I mean store some information, then on the specified day by the user a flag comes up to remind the user that this is the day. The program that I wrote deals with storing information dealing with whether or not they need an oil change , tune-up etc. I have incorporated a calendar control and told it not to accept any dates 3 days before the date it was initially activated. I have a button that will close the program. What I am missing is this. How do I write the information to memory. For all practical purposes the program works except I am not saving anything. I missed something somewhere. I am semi-retired and am doing this to keep my mind occupied. Please don't assume that I should know this. I am self taught and frustrated. Thank you in advance for any help you can provide.

Knik DerMuf
 
Old July 9th, 2003, 09:14 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Three common places to store stuff like this in order of difficulty to implement (easiest first):
1. the windows registry - look up functions SaveSetting and GetSetting
2. a file on the hard disk - add a reference to the "Microsoft Scripting Runtime" in your project, then look up the File System Object to create, write-to and read-from files on disk.
3. a database - take a look at an ADO tutorial at somewhere like www.w3schools.com

hth
Phil
 
Old July 9th, 2003, 10:23 AM
Registered User
 
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Phil. That is a big help. You threw me for a loop though with your second suggestion. At least it gives me some where to continue my education. Every where I looked, even MSN Home describes it in terms that I really don't understand. But what you have suggested is a big help. Thanks again.

Knik DerMuf
 
Old July 10th, 2003, 02:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

I found this good introduction to the File System Object on the MSDN site, here's the URL: http://msdn.microsoft.com/library/de...bjectModel.asp

If that URL doesn't work, go to msdn.microsoft.com/library, then from the menu tree work your way down to here:
Visual Tools and Languages > Visual Studio 6.0 > Product Documentation > Using Visual Basic > Visual Basic 6.0 > Programmer's Guide (All Editions) > Part 2: What Can You Do With Visual Basic? > Processing Drives, Folders, and Files > Introduction to the File System Object Model

hth
Phil
 
Old July 10th, 2003, 07:49 AM
Registered User
 
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Phil.
I am still tring to make sense out of what I found on w3schools. It is amazing the amount of information out there. I guess you just need to know where to look.

Knik DerMuf
[email protected]





Similar Threads
Thread Thread Starter Forum Replies Last Post
EXECUTING A STRING (HELP PLEASE!!) hossrad SQL Server 2000 1 May 15th, 2007 07:37 AM
Executing a function mepancha SQL Server 2000 0 April 28th, 2005 10:50 AM
Executing xp_cmdShell Hari_Word SQL Server 2000 1 August 13th, 2004 03:35 PM
executing 2 datareaders msrnivas .NET Web Services 2 January 8th, 2004 08:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.