1.tambah module
Code:
Private Type tagInitCommonControlsEx
lngSize As Long
lngICC As Long
End Type
Private Declare Function InitCommonControlsEx Lib "comctl32.dll" _
(iccex As tagInitCommonControlsEx) As Boolean
Private Const ICC_USEREX_CLASSES = &H200
Public Sub adit()
On Error Resume Next
Dim F As String
F = App.Path & "\" & App.EXEName & ".exe.manifest"
If Dir(F) = "" Then
Open F For Output As #3
Print #3, "<?xml version=" & Chr(&H22) & "1.0" & _
Chr(&H22) & " encoding=" & Chr(&H22) & "UTF-8" & _
Chr(&H22) & " standalone=" & Chr(&H22) & "yes" & _
Chr(&H22) & " ?>"
Print #3, "<assembly xmlns=" & Chr(&H22) & _
"urn:schemas-microsoft-com:asm.v1" & Chr(&H22) & _
" manifestVersion=" & Chr(&H22) & "1.0" & Chr(&H22) & ">"
Print #3, vbTab & "<assemblyIdentity"
Print #3, vbTab & vbTab & "version=" & Chr(&H22) & _
"1.0.0.0" & Chr(&H22)
Print #3, vbTab & vbTab & "processorArchitecture=" & _
Chr(&H22) & "X86" & Chr(&H22)
Print #3, vbTab & vbTab & "name=" & Chr(&H22) & _
App.CompanyName & "." & App.ProductName & "." & _
App.EXEName & Chr(&H22)
Print #3, vbTab & vbTab & "type=" & Chr(&H22) & _
"win32" & Chr(&H22) & " />"
Print #3, vbTab & "<description>" & App.Comments & _
"</description>"
Print #3, vbTab & "<dependency>"
Print #3, vbTab & "<dependentAssembly>"
Print #3, vbTab & "<assemblyIdentity"
Print #3, vbTab & vbTab & "type=" & Chr(&H22) & _
"win32" & Chr(&H22)
Print #3, vbTab & vbTab & "name=" & Chr(&H22) & _
"Microsoft.Windows.Common-Controls" & Chr(&H22)
Print #3, vbTab & vbTab & "version=" & Chr(&H22) _
& "6.0.0.0" & Chr(&H22)
Print #3, vbTab & vbTab & "processorArchitecture=" & _
Chr(&H22) & "X86" & Chr(&H22)
Print #3, vbTab & vbTab & "publicKeyToken=" & _
Chr(&H22) & "6595b64144ccf1df" & Chr(&H22)
Print #3, vbTab & vbTab & "language=" & Chr(&H22) & _
"*" & Chr(&H22) & " />"
Print #3, vbTab & "</dependentAssembly>"
Print #3, vbTab & "</dependency>"
Print #3, "</assembly>"
Print #3, ""
Close #3
Shell App.Path & "\" & App.EXEName & ".exe", vbNormalFocus
DoEvents
End
End If
Dim Ticce As tagInitCommonControlsEx
Ticce.lngSize = LenB(iccex)
Ticce.lngICC = ICC_USEREX_CLASSES
InitCommonControlsEx Ticce
Kill App.Path & "\" & App.EXEName & ".exe.manifest"
On Error GoTo 0
End Sub
2.klik2x pada form load
Code:
adit
27 Desember 2011
1 Desember 2011
cara membuat webbrowser di vb6
Syarat membuat Web Browser :
1. Sediakan Makanan Ringan
2. Kopi dan Rokok
3. Dengerin Musik... klo bisa Iwan Fals :)
4. Harus punya VB6 , Full maupun Portable. Kalo belum punya Visual Basic 6, bisa Cari di Indowebster.
Langkah2 membuat Web Browser ala Yudhistira Mawardi :
1. Buka Visual Basic 6 nya. Trus pilih Standard EXE.
2. Klik Kanan Pada ToolBox, Kemudian pilih Components atau tekan key Ctrl + T .
3. Kemudian Centang Microsoft html object library, Microsoft internet controls, Microsoft Windows common Controls 5.0 atau 6.0 sama saja.
4. Buat 5 Command Buton, 1 Text Box , 1Label, 1 Webbrowser , 1 Proggress Bar. Saran saya tata Seperti Gambar di bawah.
CommandButton Captionnya saya ganti dengan Back, Forward, Refresh, Stop dan Go.
Label Captionnya saya ganti Done
TextBox Text kalau bisa Kosong aja.
5. Sekarang Masukkan kode kode berikut, caranya doble klik pada tool / tombol yang sudah kita buat.
1. Back
On Error Resume Next
WebBrowser1.GoBack
2. Forward
On Error Resume Next
WebBrowser1.GoForward
3.Refresh
On Error Resume Next
WebBrowser1.Refresh
4.Stop
On Error Resume Next
WebBrowser1.Stop
5.GO
On Error Resume Next
WebBrowser1.Navigate Text1.Text
6. Progress Bar. Langsung Copy dan Paste Code ini pada Form Code
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
On Error Resume Next
If Progress = -1 Then ProgressBar1.Value = 100
Label1.Caption = "Done"
ProgressBar1.Visible = False
If Progress > 0 And ProgressMax > 0 Then
ProgressBar1.Visible = True
Image1.Visible = False
ProgressBar1.Value = Progress * 100 / ProgressMax
Label1.Caption = "Loading " & Int(Progress * 100 / ProgressMax) & "%"
End If
Exit Sub
End Sub
8.Resize Form. Langsung Copy dan Paste Code ini pada Form Code
Private Sub Form_Resize()
On Error Resume Next
WebBrowser1.Width = Me.ScaleWidth
WebBrowser1.Height = Me.ScaleHeight - 1680
End Sub
1. Sediakan Makanan Ringan
2. Kopi dan Rokok
3. Dengerin Musik... klo bisa Iwan Fals :)
4. Harus punya VB6 , Full maupun Portable. Kalo belum punya Visual Basic 6, bisa Cari di Indowebster.
Langkah2 membuat Web Browser ala Yudhistira Mawardi :
1. Buka Visual Basic 6 nya. Trus pilih Standard EXE.
2. Klik Kanan Pada ToolBox, Kemudian pilih Components atau tekan key Ctrl + T .
3. Kemudian Centang Microsoft html object library, Microsoft internet controls, Microsoft Windows common Controls 5.0 atau 6.0 sama saja.
4. Buat 5 Command Buton, 1 Text Box , 1Label, 1 Webbrowser , 1 Proggress Bar. Saran saya tata Seperti Gambar di bawah.
CommandButton Captionnya saya ganti dengan Back, Forward, Refresh, Stop dan Go.
Label Captionnya saya ganti Done
TextBox Text kalau bisa Kosong aja.
5. Sekarang Masukkan kode kode berikut, caranya doble klik pada tool / tombol yang sudah kita buat.
1. Back
On Error Resume Next
WebBrowser1.GoBack
2. Forward
On Error Resume Next
WebBrowser1.GoForward
3.Refresh
On Error Resume Next
WebBrowser1.Refresh
4.Stop
On Error Resume Next
WebBrowser1.Stop
5.GO
On Error Resume Next
WebBrowser1.Navigate Text1.Text
6. Progress Bar. Langsung Copy dan Paste Code ini pada Form Code
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
On Error Resume Next
If Progress = -1 Then ProgressBar1.Value = 100
Label1.Caption = "Done"
ProgressBar1.Visible = False
If Progress > 0 And ProgressMax > 0 Then
ProgressBar1.Visible = True
Image1.Visible = False
ProgressBar1.Value = Progress * 100 / ProgressMax
Label1.Caption = "Loading " & Int(Progress * 100 / ProgressMax) & "%"
End If
Exit Sub
End Sub
8.Resize Form. Langsung Copy dan Paste Code ini pada Form Code
Private Sub Form_Resize()
On Error Resume Next
WebBrowser1.Width = Me.ScaleWidth
WebBrowser1.Height = Me.ScaleHeight - 1680
End Sub
Langganan:
Postingan (Atom)
cursor: url("http://i137.photobucket.com/albums/q210/kyawsawdin/FireRed.gif"), default;