29-03-13, 11:02 AM
كود بسيط لجعل برنامجك ينشى شورت كت له ف فولدر الاسترت اب ليبدا العمل مع تشغيل الجهاز
كود :
Dim nameee As String = System.Reflection.Assembly.GetEntryAssembly().ManifestModule.Name
Dim jkk() As String = nameee.Split(".")
Dim obj As Object
obj = CreateObject("WScript.Shell")
Dim srt As Object
srt = obj.CreateShortcut(System.Environment.GetFolderPath(Environment.SpecialFolder.Startup) & "\" & My.Application.Info.AssemblyName & ".lnk")
srt.TargetPath = My.Application.Info.DirectoryPath & "\" & jkk(0) & ".exe"
srt.WindowStyle = 5
srt.IconLocation = My.Application.Info.DirectoryPath & "\" & jkk(0) & ".exe" & "," & 0
srt.Save()