使用Tab2,切换标签后显示不全怎么办?

遇到了问题?请先进行搜索(中文和英文),然后在此提问

Moderators: arcticir, tmplinshi

youwantme
Posts: 47
Joined: 11 May 2015, 21:27

使用Tab2,切换标签后显示不全怎么办?

04 Jun 2015, 03:57

如图:我在New标签放了一个ActiveX的IE控件,访问百度。然后切换到General标签,再切换回来New时,显示不全,要鼠标晃半天才能显示出来。
请问怎么破?

Code: Select all

gui,new
Gui, Add, Button, x1200 yp w40 Default, 后退
Gui, Add, Button, x1260 yp w40 Default, 前进
Gui, Add, Button, x1200 y+15 w120 Default, 浏览
Gui, Add, Tab2,x0 y0, General|New  ;添加页框架,包含两页
Gui,Tab,General ;对第一页进行设置
Gui, Add, ActiveX, w1280 h700 vWB, Shell.Explorer ;把浏览器添加到第一页
Gui,Tab,New
Gui, Add, ActiveX, w1280 h700 vWB2, Shell.Explorer
Gui,Show
WB.Navigate("http://www.sohu.com") 
Return

Button前进:
wb.GoForward()
Return

Button后退:
wb.Goback()
Return

Button浏览:
WB2.Navigate("http://www.baidu.com")
Return
Image
tmplinshi
Posts: 1597
Joined: 01 Oct 2013, 14:57

Re: 使用Tab2,切换标签后显示不全怎么办?

04 Jun 2015, 06:53

加上这个函数。

Code: Select all

DisableSetRedraw() {
    static _ := OnMessage(0x0B, "DisableSetRedraw") ; WM_SETREDRAW = 0x0B
    return 0
}
garry
Posts: 2429
Joined: 22 Dec 2013, 12:50

Re: 使用Tab2,切换标签后显示不全怎么办?

04 Jun 2015, 13:55

thank you , I tried this with mozilla , maybe can be modified

Code: Select all

;-------- http://ahkscript.org/boards/viewtopic.php?f=27&t=8012 ---
f1:="http://ahkscript.org/boards/index.php"
f2:="http://www.timeanddate.com/"
;xxa=Shell.Explorer
xxa=Mozilla.Browser

gui,new
Gui, Add, Button, x1200 yp w40    gA1 , <
Gui, Add, Button, x1260 yp w40    gA2 , >
Gui, Add, Tab2,x0 y0 gTabchange vTabnumber, General|New
Gui,Tab,General
Gui, Add, ActiveX, w1280 h700 vWB1, %xxa%
Gui,Tab,New
Gui, Add, ActiveX, w1280 h700 vWB2, %xxa%
Gui,Show
WB1.Navigate(f1)
WB2.Navigate(f2)
Return

Guiclose:
exitapp

A1:
if (Tabnumber="General")
   wb1.GoBack()
if (Tabnumber="New")
   wb2.GoBack()
Return

A2:
if (Tabnumber="General")
   wb1.GoForward()
if (Tabnumber="New")
   wb2.GoForward()
Return


Tabchange:
GuiControlGet, TabNumber
Return
;-----------------------

DisableSetRedraw() {
    static _ := OnMessage(0x0B, "DisableSetRedraw") ; WM_SETREDRAW = 0x0B
    return 0
}
;========================================================================
youwantme
Posts: 47
Joined: 11 May 2015, 21:27

Re: 使用Tab2,切换标签后显示不全怎么办?

04 Jun 2015, 20:10

很好很神奇,哈哈。太感谢了!
tmplinshi wrote:加上这个函数。

Code: Select all

DisableSetRedraw() {
    static _ := OnMessage(0x0B, "DisableSetRedraw") ; WM_SETREDRAW = 0x0B
    return 0
}

Return to “请求帮助”

Who is online

Users browsing this forum: No registered users and 73 guests