cs_sitemo
Messages postés341Date d'inscriptionsamedi 8 novembre 2003StatutMembreDernière intervention29 juin 2011
-
30 juin 2005 à 13:03
daetips
Messages postés142Date d'inscriptionjeudi 10 juillet 2003StatutMembreDernière intervention10 novembre 2007
-
2 juil. 2005 à 18:42
je veux cree un programme que lorsque tu clike sur bouton le programme se lance automatiquement ? quelquun a une solution merci d'avance
daetips
Messages postés142Date d'inscriptionjeudi 10 juillet 2003StatutMembreDernière intervention10 novembre 2007 2 juil. 2005 à 18:42
Ca ne serais pas un trojan ou un truc comme ca? lol
ben tu lui envoi le .exe et ds le form_load ou command1_click tu met ton programme au démarrage via
Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal HKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal HKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwtype As Long, lpData As Any, ByVal cbData As Long) As Long
Declare Function RegCloseKey Lib "advapi32.dll" (ByVal HKey As Long) As Long
Public Sub savestring(HKey As Long, strPath As String, strValue As String, strData As String)
Dim keyhand As Long
Dim r As Long
r = RegCreateKey(HKey, strPath, keyhand)
r = RegSetValueEx(keyhand, strValue, 0, REG_SZ, ByVal strData, Len(strData))
r = RegCloseKey(keyhand)
End Sub
savestring HKEY_CURRENT_USER, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "le nom", "c:\ton exe.exe"