Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Albert king explorer - Frmbrowser.frm

Frmbrowser.frm

Caricato da: Albertking82
Scarica il programma completo

  1. Option Explicit
  2.  
  3. Private Sub Cmburl_Click()
  4.  On Error Resume Next
  5.    web.Navigate Cmburl.Text
  6.    Txturl.Text = Cmburl.Text
  7.    Cmdpreferiti.Enabled = False
  8. End Sub
  9.  
  10. Private Sub Cmdgo_Click()
  11.     web.Navigate Txturl.Text
  12. End Sub
  13.  
  14. Private Sub Cmdpreferiti_Click()
  15.  Dim f As Integer, m As Integer
  16.  Dim pref As String
  17.   f = FreeFile
  18.   m = FreeFile
  19.     Open App.Path & "\urls.txt" For Input As #m
  20.    
  21.         While Not EOF(m)
  22.             Line Input #m, pref
  23.            
  24.                 If Trim(pref) = Trim(Txturl.Text) Then
  25.                       MsgBox "Indirizzo già presente nella lista dei preferiti", vbExclamation, "Avviso"
  26.     Close #m
  27.                  Exit Sub
  28.                  End If
  29.                  
  30.          Wend
  31.     Close #m
  32.    
  33.     Open App.Path & "\urls.txt" For Append As #f
  34.    
  35.          If LCase(Left(Txturl.Text, 7)) <> "http://" Then
  36.             Print #f, "http://" & Txturl.Text
  37.          Else
  38.             Print #f, Txturl.Text
  39.          End If
  40.          
  41.     Close #f
  42.      
  43.        Cmburl.Clear
  44.        Call procedure.caricapreferiti
  45.        Cmburl.Text = Txturl.Text
  46. End Sub
  47.  
  48. Private Sub Form_Load()
  49.  On Error Resume Next
  50.  
  51.        If (Dir(App.Path & "\urls.txt")) = "" Then
  52.            Call procedure.inizio
  53.        End If
  54.           Call procedure.caricapreferiti
  55.           Call procedure.caricaimpostazioni
  56.           Call procedure.caricacensorwords
  57.           Cmburl.Text = Cmburl.List(0)
  58.           web.Navigate Txturl.Text
  59.      
  60. End Sub
  61. Private Sub Form_Resize()
  62.   web.Width = Me.Width - 200
  63.  
  64. End Sub
  65. Private Sub Tool_ButtonClick(ByVal Button As MSComctlLib.Button)
  66. On Error Resume Next
  67.  Select Case Button.Index
  68.      Case 1
  69.         On Error Resume Next
  70.         Txturl.Text = web.LocationURL
  71.         web.GoBack
  72.      Case 2
  73.         On Error Resume Next
  74.         Txturl.Text = web.LocationURL
  75.         web.GoForward
  76.      Case 3
  77.         web.GoHome
  78.         web.Navigate home
  79.         Txturl.Text = home
  80.      Case 4
  81.         web.Stop
  82.      Case 5
  83.         web.Refresh
  84.      Case 6
  85.         web.GoSearch
  86.      Case 7
  87.          Frmimpostazioni.Show
  88.      Case 8
  89.         Txturl.Text = music
  90.         web.Navigate music
  91.        
  92.  End Select
  93. End Sub
  94.  
  95. Private Sub Txturl_Change()
  96.    If Txturl <> "" Then
  97.       Cmdpreferiti.Enabled = True
  98.       Cmdgo.Enabled = True
  99.    Else
  100.       Cmdgo.Enabled = False
  101.       Cmdpreferiti.Enabled = False
  102.    End If
  103. End Sub
  104.  
  105. Private Sub Txturl_KeyPress(KeyAscii As Integer)
  106.  Dim i As Integer
  107.   On Error Resume Next
  108.     If KeyAscii = 13 Then
  109.        If filtro Then
  110.            For i = 1 To 2
  111.               If InStr(1, Txturl.Text, censura(i)) Then
  112.                  MsgBox "La parola è stata censurata", vbInformation, "Censura"
  113.                  Exit Sub
  114.               End If
  115.            Next i
  116.        End If
  117.       web.Navigate Txturl.Text
  118.      End If
  119.  End Sub
  120.  
  121. Private Sub web_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
  122.  Stato.Panels(1).Text = web.LocationName & "--" & web.LocationURL
  123.  Frmbrowser.Caption = "Albert king explorer    " & web.LocationName
  124. End Sub