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—

2 Tanggapan

  1. maksih mas dah kasih kode_kode perogram walaupun sedehana,,
    aku tunggu poetingan berikutnya

Tinggalkan Balasan

Fill in your details below or click an icon to log in:

WordPress.com Logo

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

Twitter picture

You are commenting using your Twitter account. Log Out / Ubah )

Facebook photo

You are commenting using your Facebook account. Log Out / Ubah )

Connecting to %s

Ikuti

Get every new post delivered to your Inbox.