Kamis, 24 April 2014






Source code berikut untuk membuat Link pada CommandButton Visual Basic 6.0.
Pada menu "New Project" pilih "Standard EXE"
Buat 1 Project dengan :
1 Command Button
1 Modul
Copy code dibawah ini dan Paste code tersebut di dalam CommandButton

Private Sub Command1_Click()
OpenURL "http://visual-basicku.blogspot.com", Me.hWnd
End Sub
Copy code dibwah ini dan Paste code tersebut didalam Modul
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Public Sub OpenURL(situs As String, sourceHWND As Long)
Call ShellExecute(sourceHWND, vbNullString, situs, vbNullString, vbNullString, 1)
End Sub  

sekarang di lihat hasil nya semoga berhasil :D
Categories:

0 komentar:

Posting Komentar