04-10-12, 12:06 AM
[COLOR="#800080"]افتح مشروع جديد وقم بمسح الكود كاملاً من فورم1 والصق الكود التالي
اضف مكتبة من ال referance>>Com
'اختر منها windows script host object model
[/COLOR]
انظر الى الكود التالي
PHP كود :
Imports IWshRuntimeLibrary
Public Class Form1
Dim path As String ="ضع هنا مسار ملف البرنامج متبوعاً ب .exe"
Dim thing As New WshShell
Dim shortcut As IWshShortcut
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If IO.File.Exists(path) = False And IO.Directory.Exists(path) = False Then
MsgBox("path is not correct")
Exit Sub
End If
shortcut = CType(thing.CreateShortcut(path & ".lnk"), IWshShortcut)
shortcut.TargetPath = path
shortcut.Save()
End Sub
End Class
تحياتي لك
ابو سامي[/COLOR]
