| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 852 人关注过本帖
标题:求高手解答:我出先实时错误-2
只看楼主 加入收藏
acdxxx177
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-7-8
收藏
 问题点数:0 回复次数:2 
求高手解答:我出先实时错误-2
Private Sub Form_Load()
     Dim s As String
     Me.Caption = ""
     Label1.Caption = "url"
     Combo1.Text = ""
     Combo1.Top = Label1.Height + 700
     Combo1.Left = 50
     WebBrowser1.Top = Combo1.Top + Combo1.Height
     WebBrowser1.Left = 0
     Form_Resize
     StatusBar1.Style = sbrSimple
     ProgressBar1.ZOrder
     Dim TextLine
     Open App.Path & "\1.txt" For Input As #1 ' 打开文件。
     Do
     Line Input #1, s
     Combo1.AddItem s
     Loop Until EOF(1) = True
     Close
     WebBrowser1.Navigate ""
     WebBrowser1.GoHome
     Form1.Picture = LoadPicture(App.Path & "\imag\meyaob.jpg")
     End Sub

Private Sub Form_Resize()

     On Error GoTo a
     Combo1.Width = Form1.Width - 100
     WebBrowser1.Width = Combo1.Width
     WebBrowser1.Height = Form1.Height - Combo1.Height - 1730
     ProgressBar1.Top = Me.Height - StatusBar1.Height - 330
     ProgressBar1.Left = 0.25 * StatusBar1.Width
     ProgressBar1.Width = 0.75 * Me.Width - 250
a:
     End Sub
     Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
     Dim frmWB As Form1
     Set frmWB = New Form1
     frmWB.WebBrowser1.RegisterAsBrowser = True
     Set ppDisp = frmWB.WebBrowser1.object
     frmWB.Visible = True
     frmWB.Picture = LoadPicture(App.Path & "\imag\meyaob.jpg")
     frmWB.WebBrowser1.SetFocus

     End Sub
     Private Sub Form_Unload(Cancel As Integer)
     Dim i As Integer
     Open App.Path & "\1.txt" For Output As #1
     For i = 0 To Combo1.ListCount - 1
     Print #1, Combo1.List(i)
     Next
     Close #1
     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 existed 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
     existed = True
     Exit For
     Else
     existed = False
     End If
     Next
     If Not existed Then
     Combo1.AddItem (Combo1.Text)
     End If
     End If
     End Sub

 Private Sub WebBrowser1_DownloadBegin()
     '下载开始时状态栏显示“Now Linking...”
     StatusBar1.SimpleText = "加载中..."
     End Sub

     Private Sub WebBrowser1_DownloadComplete()
     '下载完成时状态栏显示"Link Finished”
     StatusBar1.SimpleText = "完毕"
     ProgressBar1.Value = 0
     End Sub

  Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
     '下载进行时进度条变化
     If ProgressMax = 0 Then Exit Sub
     ProgressBar1.Max = ProgressMax
     If Progress <> -1 And Progress <= ProgressMax Then
     ProgressBar1.Value = Progress
     End If
     End Sub


     Private Sub WebBrowser1_TitleChange(ByVal Text As String)
     Combo1.Text = WebBrowser1.LocationURL
     Me.Caption = WebBrowser1.LocationName
     WebBrowser1.SetFocus
     End Sub

出现实时错误
求高手解答啊
先谢谢了
搜索更多相关主题的帖子: 实时 解答 
2008-07-08 20:14
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 
一般来说,我会说明一下错误在哪行,因为这样有助于别人帮我解决问题。
2008-07-08 21:19
acdxxx177
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-7-8
收藏
得分:0 
他没有显示啊,只有一个确定按扭,按了就退出去了
2008-07-08 23:51
快速回复:求高手解答:我出先实时错误-2
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012254 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved