navegador

Anuncio
Inicial - 1
'///--------------------------------------------'// Aplicación ....... zttNav.exe
'// Autor ............ Jesús P. M. [zttsoft.com]
'// Fecha ............ 29/04/2006 * 01/05/2006
'///--------------------------------------------Option Explicit
Const margenSuperior = 600
Const margenIzquierdo = 100
Private Sub Combo1_Click()
Combo1.AddItem Combo1.Text
WebB.Navigate Combo1.Text
End Sub
Private Sub Combo1_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = vbKeyReturn Then
Combo1_Click
End If
End Sub
Private Sub Form_Load()
Me.Show
Combo1.Text = "http://www.google.es"
WebB.Navigate "http://www.google.es"
End Sub
Private Sub Form_Resize()
Combo1.Left = margenIzquierdo + 3900
Combo1.Top = 200
Combo1.Width = Me.Width - 5000
ProgressBar1.Left = Combo1.Left + Combo1.Width + 150
ProgressBar1.Top = 200
WebB.Left = margenIzquierdo
WebB.Top = Combo1.Top + Combo1.Height + 200
WebB.Height = Me.Height - WebB.Top - 700
WebB.Width = Me.Width - 2.5 * margenIzquierdo
End Sub
Private Sub Timer1_Timer()
If WebB.Busy = False Then
Timer1.Enabled = False
Me.Caption = WebB.LocationName + " - zttNav"
Else
Me.Caption = "Cargando página..."
End If
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
On Error Resume Next
Select Case Button.Key
Case "Atras"
WebB.GoBack
Case "Adelante"
WebB.GoForward
Case "Actualizar"
WebB.Refresh
Case "Inicio"
WebB.GoHome
Case "Buscar"
WebB.GoSearch
Case "Stop"
WebB.Enabled = False
WebB.Stop
Me.Caption = WebB.LocationName
Case "Acerca"
Inicial - 2
acercaDe.Show 1
End Select
End Sub
Private Sub WebB_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, Tar
getFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
Timer1.Enabled = True
End Sub
Private Sub WebB_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
If Progress > 0 Then
ProgressBar1.Visible = True
ProgressBar1.Max = ProgressMax + Progress
ProgressBar1.Value = Progress
End If
If Progress = ProgressMax Then
ProgressBar1.Visible = False
End If
End Sub
acercaDe - 1
Option Explicit
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
Private Sub Command1_Click()
Dim X
X = ShellExecute(Me.hwnd, "Open", "charmap.exe", &O0, &O0, 1)
'notepad.exe..... Bloc de notas
'iexplore.exe.... Internet Explorer
'calc.exe........ Calculadora
'wmplayer.exe.... Reproductor wm
'wordpad.exe..... WordPad
'explorer.exe.... Mi PC
'charmap.exe..... mapa de caracteres
'"explorer.exe", "parametros(por defecto(&00)", &O0, 1)
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = vbBlue
Label1.MousePointer = 0
Label2.ForeColor = vbBlue
Label2.MousePointer = 0
End Sub
Private Sub Label1_Click()
Dim X
X = ShellExecute(Me.hwnd, "Open", _
"mailto:miCorreo@hotmail.com?subject=respuesta comercial", &O0, &O0, 1)
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = vbRed
Label1.MousePointer = 99
End Sub
Private Sub Label2_Click()
Dim X
X = ShellExecute(Me.hwnd, "Open", _
"http://www.zttsoft.com", &O0, &O0, 1)
End Sub
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label2.ForeColor = vbRed
Label2.MousePointer = 99
End Sub
Descargar