daslick Posted May 4, 2007 Posted May 4, 2007 What styles do you use to make a window maximized, have a minimize and maximize button, and not allow changing of size? I know I need $WS_SYSMENU + $WS_MINIMIZEBOX + $WS_MAXIMIZEBOX Sorry for the noob question... I DID READ THE HELP!
daslick Posted May 4, 2007 Author Posted May 4, 2007 (edited) this is as close as I have been able to get BitOR($WS_CLIPSIBLINGS,$WS_SYSMENU,$WS_MINIMIZEBOX,$WS_MAXIMIZEBOX,$WS_OVERLAPPEDWINDOW,$WS_POPUP) It has the Restore Down option, which I want to disable, and it can be moved with the titlebar Edited May 4, 2007 by daslick
smashly Posted May 5, 2007 Posted May 5, 2007 (edited) This works for me... GUICreate("test", 400, 300, -1, -1, $WS_SYSMENU+$WS_MINIMIZEBOX+$WS_MAXIMIZEBOX+$WS_CAPTION) Cheers Edit: when I look at your first post again , I'm still not sure exactly what you mean. If I maximise a window then it's resized to fullscreen.. Is your gui starting a maximized and you only want the option to minimize to the toolbar and restore it only to fullscreen when returned from the toolbar? Edited May 5, 2007 by smashly
NELyon Posted May 5, 2007 Posted May 5, 2007 Edit: when I look at your first post again , I'm still not sure exactly what you mean.If I maximise a window then it's resized to fullscreen.. Is your gui starting a maximized and you only want the option to minimize to the toolbar and restore it only to fullscreen when returned from the toolbar?In other words: Must be either Full Screen or Minimized- no resizing.Sorry, i just found your post very confusing
smashly Posted May 5, 2007 Posted May 5, 2007 (edited) Yep Senton-Bomb I can see I may come off as confusing, I often baffle myself at times ... Hey daslick if you wanted the maximized viewing of the gui in relation to the desktops resolution, taking into account that a user may have their windows toolbar in various position , with minimize and maximize without resizing the window then you could try this:expandcollapse popup#include <GUIConstants.au3> Global $tl[4] AutoItSetOption("WinTitleMatchMode", 4) ; So the Shell_TrayWnd pos and size can be found. TrayPosition() ; Get the pos and size of the Shell_TrayWnd so you can set the gui max size of the desktop is but still keeping it in view. GUICreate("test",@DesktopWidth - $tl[0],@DesktopHeight - $tl[1], $tl[2], $tl[3], $WS_SYSMENU+$WS_MINIMIZEBOX+$WS_MAXIMIZEBOX+$WS_CAPTION) GuiSetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case -3 Exit EndSwitch WEnd Func TrayPosition() $tsf = WinGetPos("classname=Shell_TrayWnd") If $tsf[0] = 0 And $tsf[1] <= 0 And $tsf[3] < @DesktopHeight Then ;Top $tl[0] = 0 $tl[1] = $tsf[3] $tl[2] = 0 $tl[3] = $tsf[3] ElseIf $tsf[0] = 0 And $tsf[1] > 0 And $tsf[2] = @DesktopWidth Then ;Bottom $tl[0] = 0 $tl[1] = $tsf[3] $tl[2] = 0 $tl[3] = 0 ElseIf $tsf[0] <= 0 And $tsf[1] = 0 And $tsf[3] = @DesktopHeight Then ;Left $tl[0] = $tsf[2] $tl[1] = 0 $tl[2] = $tsf[2] $tl[3] = 0 ElseIf $tsf[0] > 0 And $tsf[1] = 0 And $tsf[3] = @DesktopHeight Then ; Right $tl[0] = $tsf[2] $tl[1] = 0 $tl[2] = 0 $tl[3] = 0 EndIf EndFunc Cheers Edited May 5, 2007 by smashly
daslick Posted May 6, 2007 Author Posted May 6, 2007 That doesn't work, at least for me on Vista... I just don't want the window resized or moved... The only option I want is to minimize.
smashly Posted May 6, 2007 Posted May 6, 2007 (edited) What styles do you use to make a window maximized, have a minimize and maximize button, and not allow changing of size?Sorry about that I shoulda guessed that part about vista and no maximize or no moved, have no idea when it comes to vista...lolGood luckPS. Thank You once again for your great work on that desktop viewing scrtipt you wrote , I got it running comfortably on XP using the above sample as a backdrop, using A2D plugin presenting 5 frames a sec on my lan. The good part about using the A2d plugin to draw the snapshot is the d3d device actually resizes the render to the backdrop size of the gui. (no cropping) So I can view the full image of 1600 x 1200 snapshot remotely on my other low res monitor PCs. w00t @ Senton-Bomb hmph , It looks like my earlier question wasn't so confusing after I read daslick last post. Edited May 7, 2007 by smashly
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now