• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 5 رای - 2.2 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: Start up
حالت موضوعی
#1
یک کد میخوام که وقتی ویندوز بالا بیاد برنامه باز شه
 
پاسخ
#2
Version Compatibility: Visual Basic 6, Visual Basic 5


More information:
Add
this code to a module. (Set Startup to Sub_Main)
What this code does is read the commandline, and add the commandline to
Registry->startup... There's no error-checking, so you'll have to
type really careful. These funcs are handy for other programs you may
want to build...

Instructions: Copy the declarations and code below and paste directly into your VB project.


Declarations:
کد:
'Add this to a module
'Goto Project Propertys
'Set Startup to Sub Main
'Compile file
'Dos Navigator to use.
'Type App.ExeName [KEYNAME], [FILENAME]

Private Declare Function RegSetValueEx Lib "advapi32" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, ByVal szData As String, ByVal cbData As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long


code:

کد:
Public Function Registry(KeyName As String, EXEName As String)
Dim HREG As Long
RegOpenKeyEx &H80000002, "Software\Microsoft\Windows\CurrentVersion\Run", 0, &H20006, HREG
StringBuffer = EXEName & vbNullChar
RegSetValueEx HREG, KeyName, 0, 1, ByVal StringBuffer, Len(StringBuffer)
RegCloseKey HREG
End Function

Sub Main()
Dim CommandKey As String
Dim CommandEXE As String
If Command = "" Then Exit Sub
If Command = "?" Then MsgBox "Syntax: " & LCase(App.EXEName) & " [KEYNAME], [FILENAME]", vbInformation, "Help": Exit Sub
CommandKey = Mid(Command, 1, InStr(1, Command, ",") - 1)
CommandEXE = Mid(Command, Len(CommandKey) + 3)
Registry CommandKey, CommandEXE
End Sub
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
 
پاسخ
#3
میشه سورس بدین؟
 
پاسخ
#4
اونم سورس بود دیگه !

یکی دیگه پیوست میکنم:


.rar   Startup vb6 (parsicoders.com.rar (اندازه 2.26 KB / تعداد دانلود: 15)
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
 
پاسخ
#5
(01-24-2013، 02:51 PM)'Amin_Mansouri' نوشته: اونم سورس بود دیگه !

یکی دیگه پیوست میکنم:


 


می تونید برنامه ای بنویسید که وقتی چک باک تیک داشته باشه برنامه تو استارت اپ قرار بگیره اگه نداشته باشه قرار نگیریه
 
           یه روز خوب میاد
[عکس: emz.gif]

 
 
پاسخ
  


پرش به انجمن:


Browsing: 2 مهمان