vbnovice
05-10-2003, 08:34 AM
Hi,
I have developed an application called "Quick Access XP" it is a program that basicly has a series of command buttons which allows a user to open up notepad e.c.t using the "Shell" command. I have programed the application to start as a tray icon and when it is clicked once (by left or right mouse button) it displays my program. I have menus which allow the user to minimize to tray and to exit. Also I have a Help menu which displays an about form.
Anyway everything works fine but now I want to make my program (using a reg key in HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\run\)
boot every time the PC starts so it is easily accessable by the user.
This is were I am having trouble I have tried reusing code from sample apps so many times it isn't funny but none of them seem to work.
This is my latest attempt:
On Error Resume Next ' Make sure no errors occur
If App.PrevInstance = True Then End ' If its already running , close this version
regkeyname = "QuickAccessXP"
UpdateKey &H80000002, "software\microsoft\windows\currentversion\run\", regkeyname , App.Path & "\" & App.EXEName & ".exe"
When it is run it comes up with this error "ByRef argument type mismatch"
and highlights the word in orange.
If you have read this far I THANK YOU very much in advance and if you chose to try and help me that is even better!
Thanks :cool:
I have developed an application called "Quick Access XP" it is a program that basicly has a series of command buttons which allows a user to open up notepad e.c.t using the "Shell" command. I have programed the application to start as a tray icon and when it is clicked once (by left or right mouse button) it displays my program. I have menus which allow the user to minimize to tray and to exit. Also I have a Help menu which displays an about form.
Anyway everything works fine but now I want to make my program (using a reg key in HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\run\)
boot every time the PC starts so it is easily accessable by the user.
This is were I am having trouble I have tried reusing code from sample apps so many times it isn't funny but none of them seem to work.
This is my latest attempt:
On Error Resume Next ' Make sure no errors occur
If App.PrevInstance = True Then End ' If its already running , close this version
regkeyname = "QuickAccessXP"
UpdateKey &H80000002, "software\microsoft\windows\currentversion\run\", regkeyname , App.Path & "\" & App.EXEName & ".exe"
When it is run it comes up with this error "ByRef argument type mismatch"
and highlights the word in orange.
If you have read this far I THANK YOU very much in advance and if you chose to try and help me that is even better!
Thanks :cool: