Source code untuk membuka link dan Email pada Visual Basic 6.0
Source code berikut untuk membuka link atau Email pada Visual Basic.
Buat 1 project dengan :
1 Form
2 Command Button
2 Text Box
Copy source code berikut pada Form :
DOWNLOAD Full Source Project
1 Form
2 Command Button
2 Text Box
Copy source code berikut pada Form :
Private 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 Function OpenBrowser(ByVal URL As String) As Boolean Dim res As Long res = ShellExecute(0&, "open", URL, vbNullString, vbNullString, vbNormalFocus) OpenBrowser = (res > 32) End Function Private Sub Command1_Click(Index As Integer) Select Case Index Case 0 Call OpenBrowser(Text1(0).Text) Case Else Call OpenBrowser(Text1(1).Text) End Select End Sub
DOWNLOAD Full Source Project