Private Declare Function fCreateShellLink Lib "VB5STKIT.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
errr, if you are using the registry then I see no reason to aviod API's (how can you do this with an API?)
umm if you want to do what axion_sa said:
VB Code:
Imports Microsoft.Win32
Private Sub AddToRun(ByVal appPath As String, ByVal appTitle As String)
' I used CreateSubKey instead of OpenSubKey. It looks like that not all machines have a Run folder :D
Dim regRun As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Run")
regRun.SetValue(appTitle, appPath)
regRun.Close()
End Sub
This will add the key to that part of the registry, but I havent tested to see if it works... so you call it like this
AddToRun (APPLICATION'S EXECUTABLE PATH, "My Application Title!")
Last edited by MrPolite; Oct 16th, 2002 at 01:22 AM.
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB ) VB.NET to C# conversion tips!!