Source Code VB 6.0 Membuat Shortcut


Di bawah ini adalah source code vb 6.0 untuk membuat shortcut program.

  • buat satu command button di form dan satu label
  • kemudian copy paste source code di bawah ke form yang sudah dibuat

Option Explicit

Private Sub Command1_Click()
CreateProgManGroup Me, “Shorcut Dari Notepad”, “c:\windows”
CreateProgManItem Me, “Notepad.exe”, “VB Library”
End Sub

Private Sub CreateProgManGroup(x As Form, GroupName$, GroupPath$)
Dim i%, z%
Screen.MousePointer = 11
On Error Resume Next
x.Label1.LinkTopic = “ProgMan|Progman”
x.Label1.LinkMode = 2
For i% = 1 To 10
z% = DoEvents()
Next
x.Label1.LinkTimeout = 100
x.Label1.LinkExecute “[CreateGroup(” + GroupName$ + _
Chr$(44) + GroupPath$ + “)]”
x.Label1.LinkTimeout = 50
x.Label1.LinkMode = 0
Screen.MousePointer = 0
End Sub

Private Sub CreateProgManItem(x As Form, CmdLine$, IconTitle$)
Dim i%, z%
Screen.MousePointer = 11
On Error Resume Next
x.Label1.LinkTopic = “ProgMan|Progman”
x.Label1.LinkMode = 2
For i% = 1 To 10
z% = DoEvents()
Next
x.Label1.LinkTimeout = 100
x.Label1.LinkExecute “[AddItem(” + CmdLine$ + Chr$(44) + _
IconTitle$ + Chr$(44) + “,,)]”
x.Label1.LinkTimeout = 50
x.Label1.LinkMode = 0
Screen.MousePointer = 0
End Sub

  • kemudian di run, apakah yg terjadi??

—Selamat Mencoba—

Iklan

2 pemikiran pada “Source Code VB 6.0 Membuat Shortcut

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s