Jump to content

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


ds10025
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...