Create IE window without title bar and border line
-
- Posts: 74
- Joined: 18 May 2017, 10:56
Create IE window without title bar and border line
is there a way to hide title bar and border line of the Internet Explorer window like what we do for wb.ToolBar := false and wb.MenuBar := false?
Re: Create IE window without title bar and border line
Not sure if this is the look you're going for:
Code: Select all
Run, iexplore.exe
WinWait, ahk_exe iexplore.exe
WinSet, Style, -0xC00000, ahk_exe iexplore.exe ;remove caption
WinSet, Style, -0x40000, ahk_exe iexplore.exe ;remove border
Re: Create IE window without title bar and border line
Run, iexplore -k "html://www.autohotkey.com"
-
- Posts: 74
- Joined: 18 May 2017, 10:56
Re: Create IE window without title bar and border line
I am looking for something like the below code:
The problem with this code is that sometimes WinSet will change other active windows. I tried this but it doesn't work.
How can I do it using wb.HWND to make sure that only the created IE object by AutoHotKey is selected? or is there a better way to do it?
Code: Select all
Path := "http://www.autohotkey.com"
wb := ComObjCreate("InternetExplorer.Application")
wb.visible := true
wb.ToolBar := false
wb.MenuBar := false
wb.Height := 1400
wb.Width := 1400
wb.Navigate(Path)
WinSet, Style, -0xC00000, A
WinSet, Style, -0x40000, A
While wb.readyState!=4 || wb.document.readyState!="complete" || wb.busy
Sleep 50
Code: Select all
Path := "http://www.autohotkey.com"
wb := ComObjCreate("InternetExplorer.Application")
wb.visible := true
wb.ToolBar := false
wb.MenuBar := false
wb.Height := 1400
wb.Width := 1400
wb.Navigate(Path)
oIEHWND := wb.HWND
WinSet, Style, -0xC00000, ahk_id %oIEHWND%
WinSet, Style, -0x40000, ahk_id %oIEHWND%
While wb.readyState!=4 || wb.document.readyState!="complete" || wb.busy
Sleep 50
How can I do it using wb.HWND to make sure that only the created IE object by AutoHotKey is selected? or is there a better way to do it?
Re: Create IE window without title bar and border line
You tried exactly what I would have suggested. A compromise between using A for the active window and wb.HWND might be to define the WinTitle as I did (ahk_exe iexplore.exe). If you have only one IE window, it would seem to work.
Re: Create IE window without title bar and border line
- Your script worked for me, I've made two edits that I've marked, that might make it slightly more reliable, but that perhaps aren't necessary.
- Re. a compromise, I would use: ahk_class IEFrame
Code: Select all
DetectHiddenWindows, On ;edit (in case we grab the hWnd before the window is visible)
Path := "http://www.autohotkey.com"
wb := ComObjCreate("InternetExplorer.Application")
wb.visible := true
wb.ToolBar := false
wb.MenuBar := false
wb.Height := 1400
wb.Width := 1400
wb.Navigate(Path)
oIEHWND := wb.HWND
if oIEHWND ;edit (I don't really think this is necessary, because I would expect to have an hWnd here)
{
WinSet, Style, -0xC00000, ahk_id %oIEHWND%
WinSet, Style, -0x40000, ahk_id %oIEHWND%
}
While wb.readyState!=4 || wb.document.readyState!="complete" || wb.busy
Sleep 50
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: No registered users and 210 guests