Results 1 to 25 of 25

Thread: [2005] open at startup+checkbox

Threaded View

  1. #1

    Thread Starter
    Lively Member smart_phil_dude1's Avatar
    Join Date
    Jun 2005
    Location
    Behind You!
    Posts
    125

    Resolved [2005] open at startup+checkbox

    kk i have the following code to have a checkbox to have the program automatically open at startup or not:
    VB Code:
    1. Dim key As Microsoft.Win32.RegistryKey
    2.         key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
    3.  
    4.         If CheckBox3.Checked = True Then
    5.             key.SetValue("Notes", Application.ExecutablePath)
    6.             MsgBox("Set '" & CType(key.GetValue("Notes"), String) & "' to open at system startup.")
    7.         Else
    8.             key.DeleteValue("Notes")
    9.         End If

    well it works perfectly fine but i noticed a little problem... when re-loading the application, i noticed that the checkbox is set back to the default setting (unchecked)

    i want the app to check, as soon as the form is loaded, to see if the app is already in the registry to run at startup, and if so then have the checkbox checked, but if not then have it unchecked


    all help would be appreciated
    thanks
    cheers,
    Phil.
    Last edited by smart_phil_dude1; Oct 18th, 2006 at 06:07 PM.
    Please Help Us Save Ana or donate now by going to Oneana.com

    Visit my Website at http://www.therealfantasy.com

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