Re; help with guictrlcreateobj
"valery_vi" <[email protected]>
| Newsgroups | gmane.comp.windows.autoit.user |
|---|---|
| Message-ID | <[email protected]> |
Alek wrote:
http://www.autoitscript.com/forum/index.php?showtopic=43316
"i got it working but in the obj window there are some scrollbars, i
want to know how to remove it."
I see that Mozzilla open short pages without scrollbar:
#include <GUIConstants.au3>
Global $Mozilla
Dim $bl = 0, $bt = 100, $bw = 500, $bh = 300
$sFilename = @scriptDir&"\blank.html"
$sHTML
= '<HTML><HEAD></HEAD><body><button>Test</button></body></HTML>'
FileDelete($sFilename)
FileWrite($sFilename,$sHTML)
$Mozilla = ObjCreate("Mozilla.Browser.1")
$hwnd = GuiCreate("Mozilla ActiveX Control", 500, 400, 300, 100,
$WS_OVERLAPPEDWINDOW)
$url = 'http://www.autoitscript.com/forum/index.php?showtopic=42864'
$inp = GuiCtrlCreateInput($url, 10, 20, 300, 20)
$Go = GuiCtrlCreateButton("Go", 330, 20, 50, 15)
$GUI = GUICtrlCreateObj($Mozilla, 0, 60, 500, 340)
$Mozilla.Navigate($sFilename)
GUISetState ()
while 1
$msg = GUIGetMsg()
if $msg = $GUI_EVENT_CLOSE then Exit
if $msg = $Go then $Mozilla.Navigate(GUICtrlRead($inp))
wend
You can compare this behaviour with IE after replacement line of
above script
$Mozilla = ObjCreate("Mozilla.Browser.1")
to
$Mozilla = ObjCreate("Shell.Explorer.2")
Thus, Alek is right.
Valery