最近无聊就写了个加浏览器的程序
发给朋友测试时出现了如图的问题
请问如何解决
代码如下:
Private Sub Form_Load()
Combo1.text = ""
Combo1.Top = 0
Command1.Top = 0
WebBrowser1.Top = Combo1.Top + Combo1.Height
WebBrowser1.Left = 0
Form_Resize
StatusBar1.Style = sbrSimple
End Sub
Private Sub Form_Resize()
Combo1.Width = Form1.Width - Command1.Width - Label1.Width - 500
Command1.Left = Form1.Width - Command1.Width - 200
WebBrowser1.Width = Combo1.Width + Command1.Width
WebBrowser1.Height = Form1.Height - Combo1.Height - 1000
End Sub
Private Sub combo1_click()
WebBrowser1.Navigate Combo1.text
End Sub
Private Sub combo1_keydown(keycode As Integer, shift As Integer)
Dim i As Long
Dim flag As Boolean
If keycode = 13 Then
If Left(Combo1.text, 7) <> "http://" Then
Combo1.text = "http://" + Combo1.text
End If
WebBrowser1.Navigate Combo1.text
For i = 0 To Combo1.ListCount - 1
If Combo1.List(i) = Combo1.text Then
flag = True
Exit For
Else
flag = False
End If
Next
If Not flag Then
Combo1.AddItem (Combo1.text)
End If
End If
End Sub
Private Sub webborwser1_downloadbegin()
StatusBar1.SimpleText = "完毕"
End Sub
Private Sub sd_Click()
End Sub
Private Sub webbrowser1_titlechange(ByVal text As String)
Combo1.text = WebBrowser1.LocationURL
End Sub
Private Sub command1_click()
If Left(Combo1.text, 7) <> "http://" Then
Combo1.text = "http://" + Combo1.text
End If
WebBrowser1.Navigate Combo1.text
For i = 0 To Combo1.ListCount - 1
If Combo1.List(i) = Combo1.text Then
existed = True
Exit For
Else
existed = flase
End If
Next
If Not existed Then
Combo1.AddItem (Combo1.text)
End If
End Sub