02-11-2013، 10:47 AM
درود
خوب هستی ؟
یه مثال میزنم که روی دسکتاپ میسازی
بفرمایید :
خوب هستی ؟
یه مثال میزنم که روی دسکتاپ میسازی
بفرمایید :
کد:
'Description:
'This vb6 code allows you to create a shortcut of any file on the desktop
'Please (Project > References > Add Microsoft Script RunTime
'Public By Parsicoders.com
Public Sub CreateShortcut(FilePath As String, ShortcutName As String)
Dim Filesys As New FileSystemObject
Dim WshShell As Object
Dim oShellLink As Object
Dim DesktopPath As String
Set WshShell = CreateObject("WScript.Shell")
DesktopPath = WshShell.SpecialFolders("Desktop")
Set oShellLink = WshShell.CreateShortcut(DesktopPath & "\" & ShortcutName & ".lnk")
If Filesys.FileExists(oShellLink) Then
MsgBox ("Already Exist")
Exit Sub
End If
oShellLink.TargetPath = FilePath
oShellLink.IconLocation = FilePath
oShellLink.WorkingDirectory = FilePath
oShellLink.Save
Set oShellLink = Nothing
Set WshShell = Nothing
End Sub
Private Sub Form_Load()
Call CreateShortcut("c:\amin.txt", "parsicoders")
End Sub
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg