DonationCoder.com Software > Post New Requests Here
tool to fullscreen (not just maximize) any application?
skrommel:
:tellme: Oh no, Fullscreen is not simple! Try starting Outlook Express and Alt-LeftClick in the message window. Now the message window fills the screen, but if you move the mouse to any screen edge, that hidden part is automatically revealed! It's just amazing!
But your script is very useful, and very impressive for an AHK noob!
Skrommel
justice:
Hey great script: comments with a dual monitor setup:
* fullcreen app always goes to screen 1: feature or bug? you decide
* I see a pixel or two on screen 2 (right border) edit: ahh one of the two variables (padding to 0 solves it :Thmbsup:
* add WinSet, Redraw,,%ID% before end of subroutine to prevent screen redrawing options on vista!
refreshfix sourcecode
--- ---fs_engaged := 0 ; is "fullscreen" engaged for some window?
padding := 0 ; additional padding width to remove, in pixels
#f::
if (fs_engaged = 0) {
ID:=WinActive("A")
WinGetPos, oldX, oldY, oldW, oldH ; save old dimensions
WinSet, Style, -0xC00000, ahk_id %ID% ; remove titlebar/WS_CAPTION
WinSet, Style, -0x40000 , ahk_id %ID% ; remove borders/WS_SIZEBOX
WinSet, AlwaysOnTop , On, ahk_id %ID%
;; work out current desktop resolution
SysGet, m, Monitor
desk_width := mRight - mLeft
desk_height := mBottom - mTop
WinMove, ahk_id %ID%,, -padding,-padding
,desk_width+2*padding, desk_height+2*padding
fs_engaged:=1
} else {
;; reverse all the operations performed above
WinSet, AlwaysOnTop , Off, ahk_id %ID%
WinSet, Style, +0xC00000, ahk_id %ID%
WinSet, Style, +0x40000 , ahk_id %ID%
WinMove, ahk_id %ID%,, oldX,oldY, oldW,oldH
fs_engaged:=0
}
WinSet, Redraw,,%ID%
return
mackal:
:tellme: Oh no, Fullscreen is not simple! Try starting Outlook Express and Alt-LeftClick in the message window. Now the message window fills the screen, but if you move the mouse to any screen edge, that hidden part is automatically revealed! It's just amazing!-skrommel (May 16, 2007, 01:43 AM)
--- End quote ---
Sorry, that came out wrong: I meant that the functionality of it that I needed (i.e., just a simple fullscreen) is what was simple. Clearly the Fullscreen app you mentioned can do tons more. In my case I am fairly sure I wouldn't end up using the rest of the features in the long term... (I am finding I am most productive with my tools when I K.I.S.S. [Keep It Simple, Stupid].)
mackal:
* fullcreen app always goes to screen 1: feature or bug? you decide
* I see a pixel or two on screen 2 (right border) edit: ahh one of the two variables (padding to 0 solves it :Thmbsup:
* add WinSet, Redraw,,%ID% before end of subroutine to prevent screen redrawing options on vista! -justice (May 16, 2007, 03:22 AM)
--- End quote ---
Yes, I totally ignored multi-monitor setup in that script, mostly because I don't use one most of the time. It also made the script simple; with a multi-monitor setup where you potentially can have a fullscreened app on each monitor, you're going to have to get more fancy: not only do you have to memorize which app is fullscreened on which screen, but you also have to work out what an un-fullscreen keystroke is to do (i.e., there are a number of "logical" ways to interpret such a keystroke then).
Interesting about "padding". I used it to eliminate some extra "glare" around the screen border... if I set padding=0 and fullscreen a dark background window, then the around the edge of the screen I'll get a bright outline 1- or 2-pixels wide. Hence "padding=2", which actually I meant to call "anti-padding". But if you say that this causes the window to stick out onto the next screen, then... I see, I guess just stripping the window border and titlebar leaves the window's client area still in some sort of container window which shows through by 1- or 2-pixels around the client area. I wonder what a clean way of getting rid of that would be. That extra border is annoying, especially considering that the whole point of fullscreening the app, at least for me, is to eliminate any visually distracting elements...
I'll have to look up that Redraw bit you mentioned. I'm running on WinXP SP2, hence haven't run into the issue. Actually, speaking of redraws, I wish there was a way to tell AHK/Windows to "freeze" the window display untill all the operations (stripping of window parts, moving, resizing) are done, to avoid the "repainting"/flashing effect that such a quick succession of operations produces...
skrommel:
:) To prevent windows repainting, have a look at these API functions:
SendMessage(hwnd, WM_SETREDRAW, FALSE, 0)
SendMessage(hwnd, WM_SETREDRAW, TRUE, 0)
or
SetWindowRedraw(hwnd, FALSE)
SetWindowRedraw(hwnd, TRUE)
Try something like
--- ---hwnd:=WinExist("A")
DllCall("SetWindowRedraw",UInt,hwnd,UInt,1)Skrommel
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version