Jump to content
Sign in to follow this  
ds10025

Use IE create to create a Window without minimize and maximize buttons

Recommended Posts

ds10025

Morning

Is it possible to use IE create to open IE7 without minimize and maximize buttons?

Share this post


Link to post
Share on other sites
DaleHohm

Not directly, but _IEPropertyGet - you get a window handle (hwnd) and you can then manipulate it.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites
ValeryVal

Try this example

#include <GuiConstants.au3>
Global $hWnd
Opt("WinTitleMatchMode", 2)
Run('"C:\Program Files\Internet Explorer\iexplore.exe" -extoff')
WinWaitActive("Windows Internet Explorer", "")
$hWnd = WinGetHandle ("Windows Internet Explorer", "")
$IEStyle = _GuiGetStyle($hWnd)
$NewStyle = $IEStyle[0] - $WS_MAXIMIZEBOX-$WS_MINIMIZEBOX
_GuiSetStyle($NewStyle, -1)

;===================================
; get default GUI styles
; returns a two-element array that containing the gui style information:
; $array[0] = style
; $array[1] = exStyle
func _GuiGetStyle($hWnd)
local $Style[2]
$res = DllCall("User32.dll", "int", "GetWindowLong", "hwnd", $hWnd, "int", -16)
$Style[0] = $res[0]
$res = DllCall("User32.dll", "int", "GetWindowLong", "hwnd", $hWnd, "int", -20)
$Style[1] = $res[0]
Return $Style
endfunc

;Set Gui Styles
func _GuiSetStyle($Style=-1,$ExStyle=-1)
Global $GWL_STYLE = -16
Global $GWL_EXSTYLE = -20
 if $Style=-1 then $Style=$WS_MINIMIZEBOX+$WS_CAPTION+$WS_POPUP+$WS_SYSMENU
 $res = DllCall("User32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", $GWL_STYLE, "int", $Style)
 if $ExStyle<>-1 then $res = DllCall("User32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", $GWL_EXSTYLE, "int", $ExStyle)
 DllCall("User32.dll", "int", "SetWindowPos", "hwnd", $hWnd, "hwnd", 0, "int", 0, "int", 0, "int", 0, "int", 0, "int", 0x47)
endfunc

It's pity that new funcs GuiGetStyle and GuiSetStyle can't do the same


The point of world view

Share this post


Link to post
Share on other sites
ds10025

Hi

Thanks again for you replies.

I think this alone the same question:-

Will it be possible to use example scripts do something like

Loop=1

While Loop <>1 do

Run (Internet explorer.exe sw_max)

Switch

On-click minimize button Do

Run (Internet explorer.exe sw_max)

On-click exit button Do

Run (Internet explorer.exe sw_max)

end switch

End Loop

What I am aiming for, if the exit or minimize button is clicked, it just restart Internet explorer.exe with sw_max.

Also, can I hide the Windows XP taskbar?

Aslo, disable right mouse button click?

Share this post


Link to post
Share on other sites
ValeryVal

Is this for Internet cafe? If so there are other methods, I think.


The point of world view

Share this post


Link to post
Share on other sites
Richard Robertson

You'd be better off writing a new GUI and adding the embedded IE box. That way you can just maximize it and not use the frame styles.

Share this post


Link to post
Share on other sites
ds10025

Thanks

Yes, I'l trying to setup Internet KIOSK script.

Share this post


Link to post
Share on other sites
DaleHohm

You may also want to look at this (not everything you want, however):

_IEPropertySet($oIE, "theatermode")

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×