TKJ 2 comunity

forum ini khusus buat para TKJ lovers
 
IndeksCalendarFAQPencarianAnggotaGroupPendaftaranLogin

Share | 
 

 bikin browser sederhana

Topik sebelumnya Topik selanjutnya Go down 
PengirimMessage
uzumady
Admin
Admin
avatar

Jumlah posting : 44
ES Oyen : 0
Join date : 12.01.11
Lokasi : MAGREZZZZZZZZZZZ

PostSubyek: bikin browser sederhana    Wed Mar 02, 2011 3:21 pm

alat

siapin
1 form
1 module
8 common button
1 combo
1 webbrowser

code nya ini
Code:
'edited by ho1onk
'http://ho1onk.cz.cc
'http://ho1onk-crew.uk.cr

Public Function IsConnected() As Boolean
Dim TRasCon(255) As RASCONN95
Dim lg As Long
Dim lpcon As Long
Dim RetVal As Long
Dim Tstatus As RASCONNSTATUS95
'
TRasCon(0).dwSize = 412
lg = 256 * TRasCon(0).dwSize
'
RetVal = RasEnumConnections(TRasCon(0), lg, lpcon)
If RetVal <> 0 Then
                    MsgBox "ERROR"
                    Exit Function
                    End If
'
Tstatus.dwSize = 160
RetVal = RasGetConnectStatus(TRasCon(0).hRasCon, Tstatus)
If Tstatus.RasConnState = &H2000 Then
                        IsConnected = True
                        MsgBox " You Are Connected To Internet Surf & Enjoy ", vbMsgBoxSetForeground
                        Else
                        IsConnected = False
                        MsgBox " Sorry You Are Not Connected To Internet ", vbMsgBoxSetForeground
                        End If
                       
End Function


Sub PercentBar(Shape As Control, Done As Variant, Total As Variant)

On Error Resume Next

Shape.AutoRedraw = True

Shape.FillStyle = 0

Shape.DrawStyle = 0

Shape.FontName = "Fixedsys"

Shape.FontSize = 8.25

Shape.FontBold = False

X = Done / Total * Shape.Width

Shape.Line (0, 0)-(Shape.Width, Shape.Height), &HC0C0C0, BF

Shape.Line (0, 0)-(X - 10, Shape.Height), &H800000, BF

Shape.CurrentX = (Shape.Width / 2) - 100

Shape.CurrentY = (Shape.Height / 2) - 125

Shape.ForeColor = RGB(0, 0, 0)

End Sub

Private Sub Command1_Click()
If Combo1.Text = "" Then

MsgBox ("There Is No Page Avilable To Go Back")
Else
WebBrowser1.GoBack
End If
End Sub

Private Sub Command2_Click()
If Combo1.Text = "" Then
MsgBox ("There Is No Page Avilable To Go Forward")
Else
WebBrowser1.GoBack
End If
End Sub

Private Sub Command3_Click()
WebBrowser1.Stop
End Sub

Private Sub Command4_Click()
WebBrowser1.Refresh
End Sub

Private Sub Command5_Click()
WebBrowser1.GoHome
End Sub

Private Sub Command6_Click()
WebBrowser1.GoSearch
End Sub

Private Sub Command7_Click()
Dim a
With CommonDialog1
        .Filter = "HTML Files (*.htm)|*.htm|HTML Files (*.html)| *.html"
              .ShowOpen
    End With
    a = CommonDialog1.FileName
    Combo1.Text = a
    Combo1.SetFocus
   
End Sub


Private Sub Command8_Click()
Call IsConnected
End Sub

Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
Label1.Caption = Text
End Sub

Private Sub WebBrowser1_TitleChange(ByVal Text As String)
Me.Caption = Text
End Sub

Private Sub WebBrowser1_BeforeNavigate(ByVal url As Variant, ByVal Cancel As Boolean)
Combo1.AddItem url
End Sub

Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
WebBrowser1.Navigate (Combo1.Text)
KeyAscii = 0
End If

End Sub

module
Code:
Public Declare Function RasEnumConnections Lib "RasApi32.dll"
Alias "RasEnumConnectionsA" (lpRasCon As Any, lpcb As Long,
lpcConnections As Long) As Long
Public Declare Function RasGetConnectStatus Lib "RasApi32.dll" Alias
"RasGetConnectStatusA" (ByVal hRasCon As Long, lpStatus As Any) As
Long
'
Public Const RAS95_MaxEntryName = 256
Public Const RAS95_MaxDeviceType = 16
Public Const RAS95_MaxDeviceName = 32
'
Public Type RASCONN95
    dwSize As Long
    hRasCon As Long
    szEntryName(RAS95_MaxEntryName) As Byte
    szDeviceType(RAS95_MaxDeviceType) As Byte
    szDeviceName(RAS95_MaxDeviceName) As Byte
End Type
'
Public Type RASCONNSTATUS95
    dwSize As Long
    RasConnState As Long
    dwError As Long
    szDeviceType(RAS95_MaxDeviceType) As Byte
    szDeviceName(RAS95_MaxDeviceName) As Byte
End Type

simple kn?


semoga bermanfaat
sumber
Kembali Ke Atas Go down
Lihat profil user http://www.samwanwebster.co.cc
 
bikin browser sederhana
Topik sebelumnya Topik selanjutnya Kembali Ke Atas 
Halaman 1 dari 1
 Similar topics
-
» bikin blog hemat energi!
» Hanya Sebuah Kalimat Sederhana
» tempat bikin stang jepit custom
» Mau bikin rem depan jadi 2 sama velg jadi gede (ASK)
» shock kanan ninja dipakai kekiri buat bikin doble disc

Permissions in this forum:Anda tidak dapat menjawab topik
TKJ 2 comunity :: VB 6-
Navigasi: