| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 706 人关注过本帖
标题:[求助]怎样制作多窗口浏览器?
只看楼主 加入收藏
wangqihui200
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-5-12
收藏
 问题点数:0 回复次数:2 
[求助]怎样制作多窗口浏览器?


首先谢谢各位能看一看帖!
近日我在用VB 6.0 制作个人的多窗口浏览器!
现在遇到了点问题,希望能得到各位帮助!
大家们先看看我的程序:

Private Sub Form_Load()
Me.Caption = "My Browser"
Label1.Caption = "URL"
Combo1.Text = ""
Combo1.Top = Label1.Height
Combo1.Left = 0
WebBrowser1.Top = Combo1.Top + Combo1.Height
WebBrowser1.Left = 0
Form_Resize
StatusBar1.Style = sbrSimple
ProgressBar1.ZOrder
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 - 1000
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 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()

StatusBar1.SimpleText = "正在载入"
End Sub

Private Sub WebBrowser1_DownloadComplete()

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
End Sub


我的这段代码不能起到多窗口浏览的效果!希望各位指点指点!在下感激不尽!
希望各位能改善一下这个代码!(把状态栏和地址栏调整一下)谢谢!

还有就是希望各位大家能优化一下这个代码!谢谢!
搜索更多相关主题的帖子: 浏览器 窗口 Form STRONG 
2006-05-21 22:33
wangqihui200
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-5-12
收藏
得分:0 
怎么没人回答啊!难道没人会吗?失败啊!
斑竹,帮帮忙!
2006-05-23 22:51
wangqihui200
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-5-12
收藏
得分:0 
顶,我顶,我顶到有人答为止!
2006-05-24 19:43
快速回复:[求助]怎样制作多窗口浏览器?
数据加载中...
 
   



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

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