|
-
Aug 4th, 2000, 02:50 PM
#1
Thread Starter
Addicted Member
I would like to have my program, when ran for the first time, move itself to a certain folder (ex. C:\myprog\) and make it so it starts when windows starts, how would i go about doing this?
Also, how would I make my project, with just a click of a button, take a screen shot, and automatically save it (sshot.jpg ect.) Any Clue?
I would really appreciate the help on this one, thank you very much!
-
Aug 4th, 2000, 03:04 PM
#2
New Member
DLL
<advert deleted - James>
[Edited by James on 09-05-2000 at 05:11 AM]
-
Aug 4th, 2000, 08:04 PM
#3
To create a shortcut:
Code:
'In Visual Basic 5.0, change Stkit432.dll in the following
'statement to Vb5stkit.dll. Stkit432.dll is for Visual Basic 4.0
Private Declare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal
lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As
String, ByVal lpstrLinkArgs As String) As Long
Dim Short As Long
Short = fCreateShellLink("\Startup", _
"Myprog", "c:\myprog\myprog.exe", "")
-
Aug 4th, 2000, 08:29 PM
#4
Thread Starter
Addicted Member
thanks matt, and how would i remove it from startup?
thanks a bunch!
-
Aug 4th, 2000, 09:20 PM
#5
Use the Kill statement.
Code:
Kill ("C:\WINDOWS\Start Menu\Programs\StartUp\myprog.lnk")
-
Aug 4th, 2000, 11:24 PM
#6
Addicted Member
Screen capture code
I have code which captures the screen, but it can only save as a bitmap (not jpg), with the SavePicture statement.
If you are still interested, let me know.
-
Aug 5th, 2000, 10:05 AM
#7
To make your program start when Windows does, add the following entry to the Registry:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\. For the Value you would enter your Application name (i.e MyApp) and for the Data, you would enter the path to it, i.e C:\MyApp.exe.
-
Aug 5th, 2000, 07:44 PM
#8
Hyperactive Member
Originally posted by Megatron
To make your program start when Windows does, add the following entry to the Registry:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\. For the Value you would enter your Application name (i.e MyApp) and for the Data, you would enter the path to it, i.e C:\MyApp.exe.
I've not seen it done this way, Megatron. Perhaps you
forgot to put Run after CurrentVersion?
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|