vbs IE 窗口 最大化 (不是全屏) 如何实现?

tyty10 2009-10-30 04:13:08
vbs IE 窗口 最大化 (不是全屏) 如何实现?
vbs IE 窗口 最大化 (不是全屏) 如何实现?
...全文
2275 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Dogfish 2009-10-31
  • 打赏
  • 举报
回复
Set IE = CreateObject("InternetExplorer.Application")
IE.AddressBar = false
IE.MenuBar = false
IE.StatusBar = true
IE.ToolBar = false
IE.Visible = false
IE.Top = 0
IE.Left = 0
IE.FullScreen = True
W = IE.Width
H = IE.Height
IE.FullScreen = False
IE.Width = W
IE.Height = H
IE.Visible = true
IE.Navigate "http://www.powerjs.com/"
tyty10 2009-10-31
  • 打赏
  • 举报
回复
可以了。三楼不是想要的结果。
s11ss 2009-10-31
  • 打赏
  • 举报
回复
当然你可以一开始就是 Navigate 目标站点

With CreateObject("InternetExplorer.Application")
.Navigate "http://www.baidu.com/"
While .Busy Or (.ReadyState <> 4)
Wend

.Left = 0
.Top = 0
.Width = .document.parentWindow.screen.availWidth
.Height = .document.parentWindow.screen.availHeight
.Visible = True
End With
s11ss 2009-10-31
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 tyty10 的回复:]
With CreateObject("InternetExplorer.Application")
.Navigate "http://www.baidu.com/"
.Left = 0
.Top = 0
.Width = .document.parentWindow.screen.availWidth
.Height = .document.parentWindow.screen.availHeight
.Visible = True
End With


加上地址为什么不行?

[/Quote]因为你网页还没有加载完成就执行了下面的设置窗口的代码,所以会出错.这样就可以:
With CreateObject("InternetExplorer.Application")
.Navigate "about:blank"
.Left = 0
.Top = 0
.Width = .document.parentWindow.screen.availWidth
.Height = .document.parentWindow.screen.availHeight
.Navigate "http://www.baidu.com/"
.Visible = True
End With
tyty10 2009-10-30
  • 打赏
  • 举报
回复
With CreateObject("InternetExplorer.Application")
.Navigate "http://www.baidu.com/"
.Left = 0
.Top = 0
.Width = .document.parentWindow.screen.availWidth
.Height = .document.parentWindow.screen.availHeight
.Visible = True
End With



加上地址为什么不行?
s11ss 2009-10-30
  • 打赏
  • 举报
回复
With CreateObject("InternetExplorer.Application")
.Navigate "about:blank"
.Left = 0
.Top = 0
.Width = .document.parentWindow.screen.availWidth
.Height = .document.parentWindow.screen.availHeight
.Visible = True
End With

4,007

社区成员

发帖
与我相关
我的任务
社区描述
它是一种微软环境下的轻量级的解释型语言,它使用COM组件、WMI、WSH、ADSI访问系统中的元素,对系统进行管理。
社区管理员
  • vbScript社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧