تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
(تم الحل) Desktop Shortcut " انشاء اختصار"
#2

[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.ObjectByVal e As System.EventArgsHandles 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="#008000"]
تحياتي لك
ابو سامي[/COLOR]

}}}
تم الشكر بواسطة:


الردود في هذا الموضوع
(تم الحل) Desktop Shortcut " انشاء اختصار" - بواسطة m.sami.ak_mybb_import4434 - 04-10-12, 12:06 AM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم