Results 1 to 4 of 4

Thread: Please help me out, fellow avid coders...

  1. #1

    Thread Starter
    Addicted Member Daniel_Christie's Avatar
    Join Date
    Jan 2000
    Location
    USA
    Posts
    245

    Post

    Hello avid coders,

    I am in a bind. I need my program to present the option, under Preferences in the menu, for starting the application next time with one form or another depending on the user's preferences. How would I go about coding this function?

    Example: frm1 is a small subtle screen, where as frm2 would be a large and fully featured screen. Some users might appreciate the subtle screen, while others might prefer the fully featured screen.

    Thank you all very much on your excellent help,
    Daniel Christie

  2. #2
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Post

    Well, without going into a long description, here's what I would do.

    Use a sub procedure (sub Main) as your startup object (to define startup object go to "Project" menu, select "Project Properties...", and it's on the General tab).

    The code in this procedure should read the user's selection (probably from a .txt file that you create and save on their disk) of which form they want at startup. Then load the form they want from this procedure.

    Before your program exits, it should compare the value of the user's selection for the startup form to the one retrieved from the text file. If it has changed, update the text file so that the next time the program is started and the text file is read, it will know to open the correct form at startup.

    Hope that helps!

    ~seaweed

    P.S. You may want to first show a "splash screen" form before reading the text file...that way the user knows something is happening while your prog. is figuring out which form to startup with.

    [This message has been edited by seaweed (edited 02-02-2000).]

  3. #3

    Thread Starter
    Addicted Member Daniel_Christie's Avatar
    Join Date
    Jan 2000
    Location
    USA
    Posts
    245

    Post

    Splendid idea Seaweed,

    I kind of get what your talking about.
    I have never used a Sub Main as the sartup. I will read up on it. Thanks for pointing me in the right direction.

    P.S. A little elaboration is greatly welcomed.

  4. #4
    Member
    Join Date
    Mar 1999
    Location
    Louisville, KY
    Posts
    48

    Post

    My prefered way of saving user preferences is to store the values in the system registry. Look in your help file for the SaveSetting, GetSetting and GetAllSetting statements.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width