我对这不是很了解,各位大哥能不能帮一下哈.?
简单点就是在启动+个快捷方式.楼主的意思是在登陆前运行的程序吧?这就涉及注册表的问题了,到网上查查就知道了
Private Declare Function RegCreateKey& Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey&, ByVal lpszSubKey$, lphKey&)
Private Declare Function RegSetValue Lib "advapi32.dll" Alias "RegSetValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long
Sub regedit1()
'声明变量
Dim sKeyName As String, sKeyValue As String, sKeyValueIcon As String
Dim Ret As Integer, lphKey As Long
sKeyName = "Software\Microsoft\Windows\CurrentVersion\Run"
sKeyValue = App.Path & IIf(Len(App.Path) > 3, "\" & App.EXEName & ".exe", "form1.exe")
Ret = RegCreateKey&(HKEY_LOCAL_MACHINE, sKeyName, lphKey)
Ret = RegSetValue&(lphKey&, "", REG_SZ, sKeyValue, 0&)
End Sub