骗子 发表于 2011-4-2 09:39:04

GUI内嵌IE的时候如果禁止出现上下滚动条(也就是禁止上下滚动)

在http://www.autoitx.com/forum.php?mod=viewthread&tid=15552&highlight=ie%2Bgui中的3楼C.L给的代码表面上是没有滚动条,但事实上还是有的,只不过的IE的宽度大于GUI的宽度没显示出来而已,有没有办法真正的不出现上下滚动条.
这个没显示出来滚动条,但是用鼠标滚轮还是可以上下滚动的

$oIE = ObjCreate("Shell.Explorer.2")
GUICreate("Test", 390, 400, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2)
$GUIActiveX = GUICtrlCreateObj ($oIE, -450, -80,860, 500)
GUISetState()
$oIE.document.body.scroll = "no"
$oIE.navigate("http://mail.163.com")

While 1
      If GUIGetMsg () == -3 Then Exit
WEnd


当把GUI放宽之后就能看到滚动条了

$oIE = ObjCreate("Shell.Explorer.2")
GUICreate("Test", 500, 500, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2)
$GUIActiveX = GUICtrlCreateObj ($oIE, -450, -80,860, 500)
GUISetState()
$oIE.document.body.scroll = "no"
$oIE.navigate("http://mail.163.com")

While 1
      If GUIGetMsg () == -3 Then Exit
WEnd

republican 发表于 2011-4-2 09:59:28

第5和第6行代码互换。

骗子 发表于 2011-4-2 10:15:28

第5和第6行代码互换。
republican 发表于 2011-4-2 09:59 http://www.autoitx.com/images/common/back.gif

上面的例子里换了以后滚动条隐藏,但是还可以用滚轮滚动

但是我又稍微修改了一下就不行了

$oIE = ObjCreate("Shell.Explorer.2")
GUICreate("Test", 500, 500, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2)
$GUIActiveX = GUICtrlCreateObj ($oIE, -1, -1,300, 300)
GUISetState()

$oIE.navigate("www.baidu.com")
$oIE.document.body.scroll = "no"
While 1
      If GUIGetMsg () == -3 Then Exit
WEnd

3mile 发表于 2011-4-2 13:07:45

还没学到,纯支持下。
guang19831217 发表于 2011-4-2 12:37 http://www.autoitx.com/images/common/back.gif
楼上的,你是复读机吗?
页: [1]
查看完整版本: GUI内嵌IE的时候如果禁止出现上下滚动条(也就是禁止上下滚动)