closeupman Posted January 6, 2005 Share Posted January 6, 2005 (edited) Why do I get the error for this $password_windowID=GUICreate ( "User Authorization" , 800 , 600 , 0 , 0 , ,$WS_EX_TOOLWINDOW)?I cut n copied the GuiCreate from the help file and substituted exactly.;* create a window ;* password must be entered in a certain time frame ;* or computer is shutdown #include <GUIConstants.au3> dim $password_windowID dim $labelID dim $editboxID dim $userInput dim $password $password_windowID=GUICreate ( "User Authorization" , 800 , 600 , 0 , 0 , ,$WS_EX_TOOLWINDOW) GUISetState (@SW_SHOW) ; will display an empty dialog box sleep(10000) Edited January 6, 2005 by closeupman Link to comment Share on other sites More sharing options...
MHz Posted January 6, 2005 Share Posted January 6, 2005 You have a blank parameter in GUICreate ;* create a window ;* password must be entered in a certain time frame ;* or computer is shutdown #include <GUIConstants.au3> dim $password_windowID dim $labelID dim $editboxID dim $userInput dim $password $password_windowID=GUICreate ( "User Authorization" , 800 , 600 , 0 , 0, $WS_EX_TOOLWINDOW) GUISetState (@SW_SHOW) ; will display an empty dialog box sleep(10000) Link to comment Share on other sites More sharing options...
closeupman Posted January 6, 2005 Author Share Posted January 6, 2005 Oh ok, I thought u had to have the , , there for exstyle parameter. I didn't specify.Btw, do you know how to get rid of the start button and taskbar.I want my GUI to cover the whole screen and if possible not allow alt+tabThanks :"> You have a blank parameter in GUICreate;* create a window ;* password must be entered in a certain time frame ;* or computer is shutdown #include <GUIConstants.au3> dim $password_windowID dim $labelID dim $editboxID dim $userInput dim $password $password_windowID=GUICreate ( "User Authorization" , 800 , 600 , 0 , 0, $WS_EX_TOOLWINDOW) GUISetState (@SW_SHOW) ; will display an empty dialog box sleep(10000)<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
MHz Posted January 6, 2005 Share Posted January 6, 2005 Change GUISetState (@SW_SHOW) to GUISetState (@SW_MAXIMIZE). Unsure of disable Alt + Tab Link to comment Share on other sites More sharing options...
SlimShady Posted January 6, 2005 Share Posted January 6, 2005 (edited) You guys skipped a parameter and used an "extended style" for the "normal style" paramater. It's better to use variables with clear names if you use a function with many parameters. ;* create a window ;* password must be entered in a certain time frame ;* or computer is shutdown #include <GUIConstants.au3> dim $password_windowID dim $labelID dim $editboxID dim $userInput dim $password $GUI_WIDTH = 800 $GUI_HEIGHT = 600 ;To center the dialog on the screen, use -1 instead of 0 for the next 2 params. $GUI_LEFT = 0 $GUI_TOP = 0 ;To use more than 1 style, use BitOR. eg: BitOR($DTS_TIMEFORMAT, $DTS_RIGHTALIGN) $GUI_STYLE = 0x0 $GUI_EXSTYLE = $WS_EX_TOOLWINDOW $password_windowID=GUICreate ( "User Authorization" , $GUI_WIDTH, $GUI_HEIGHT, $GUI_LEFT, $GUI_TOP, $GUI_STYLE, $GUI_EXSTYLE) GUISetState (@SW_SHOW) ; will display the dialog box sleep(5 * 1000) Edited January 6, 2005 by SlimShady Link to comment Share on other sites More sharing options...
closeupman Posted January 6, 2005 Author Share Posted January 6, 2005 Change GUISetState (@SW_SHOW) to GUISetState (@SW_MAXIMIZE).Unsure of disable Alt + Tab<{POST_SNAPBACK}>Ok, thanks. Should've thought of that..duh! Link to comment Share on other sites More sharing options...
closeupman Posted January 6, 2005 Author Share Posted January 6, 2005 (edited) Thanks. I did the no no of just typing as creating instead of designing properly.Thanks for the better version.Edit:Though for some reason your version won't let me hide the start and/task bar on the bottom of the screen, even when i've changed it below as specified by the other user (i.e. SW_MAXIMIZE).It works though with MY code...strange.Also if i do maximize, I would guess I don't need to specify any coordinate settings?Slim can u take a look at my Abc post and give me a critique and/or a rewrite?Thanks You guys skipped a parameter and used an "extended style" for the "normal style" paramater.It's better to use variables with clear names if you use a function with many parameters.;* create a window ;* password must be entered in a certain time frame ;* or computer is shutdown #include <GUIConstants.au3> dim $password_windowID dim $labelID dim $editboxID dim $userInput dim $password $GUI_WIDTH = 800 $GUI_HEIGHT = 600 ;To center the dialog on the screen, use -1 instead of 0 for the next 2 params. $GUI_LEFT = 0 $GUI_TOP = 0 ;To use more than 1 style, use BitOR. eg: BitOR($DTS_TIMEFORMAT, $DTS_RIGHTALIGN) $GUI_STYLE = 0x0 $GUI_EXSTYLE = $WS_EX_TOOLWINDOW $password_windowID=GUICreate ( "User Authorization" , $GUI_WIDTH, $GUI_HEIGHT, $GUI_LEFT, $GUI_TOP, $GUI_STYLE, $GUI_EXSTYLE) GUISetState ([B]@SW_MAXIMIZE[/B]) ; will display the dialog box sleep(5 * 1000)<{POST_SNAPBACK}> Edited January 6, 2005 by closeupman Link to comment Share on other sites More sharing options...
Radsam Posted January 6, 2005 Share Posted January 6, 2005 The following will maximize your window, remove the title bar, and cover over your start menu. $GUI_STYLE = $WS_MAXIMIZE+$WS_POPUP $GUI_EXSTYLE = -1 Link to comment Share on other sites More sharing options...
closeupman Posted January 6, 2005 Author Share Posted January 6, 2005 (edited) Thanks, that did that, but the title bar is still there. I want my screen to cover the full monitor without showing the title bar. Should I just make it bigger than the screen rather than maximizing? (I would rather not do this...I just tried it and it worked)/If not, How about removing the minimize button? and getting rid of the A icon in the upper left. Please see my other post about Minizmize and ABC'sAlso, do you know any way to disable alt+tab? and the right clicking?I would like any advice you can give. Even if you can't answer all.Thanks The following will maximize your window, remove the title bar, and cover over your start menu.$GUI_STYLE = $WS_MAXIMIZE+$WS_POPUP $GUI_EXSTYLE = -1<{POST_SNAPBACK}> Edited January 6, 2005 by closeupman Link to comment Share on other sites More sharing options...
Radsam Posted January 6, 2005 Share Posted January 6, 2005 (edited) WS_POPUP works for me. Copy the below code and try it. ;* create a window ;* password must be entered in a certain time frame ;* or computer is shutdown #include <GUIConstants.au3> dim $password_windowID dim $labelID dim $editboxID dim $userInput dim $password $GUI_WIDTH = 800 $GUI_HEIGHT = 600 ;To center the dialog on the screen, use -1 instead of 0 for the next 2 params. $GUI_LEFT = 0 $GUI_TOP = 0 ;To use more than 1 style, use BitOR. eg: BitOR($DTS_TIMEFORMAT, $DTS_RIGHTALIGN) $GUI_STYLE = $WS_MAXIMIZE+$WS_POPUP $GUI_EXSTYLE = -1 $password_windowID=GUICreate ( "User Authorization" , $GUI_WIDTH, $GUI_HEIGHT, $GUI_LEFT, $GUI_TOP, $GUI_STYLE, $GUI_EXSTYLE) GUISetState (@SW_SHOW) ; will display the dialog box sleep(5 * 1000) Edited January 6, 2005 by Radsam Link to comment Share on other sites More sharing options...
sykes Posted January 6, 2005 Share Posted January 6, 2005 Works for me too We have enough youth. How about a fountain of SMART? Link to comment Share on other sites More sharing options...
closeupman Posted January 6, 2005 Author Share Posted January 6, 2005 Ya...weird...that does work, thanks....maybe I copied it wrong b4. Or maybe I switch the params in the GuiCreate. Does it matter if u have exstyle b4 style?I was able to do a similar thing by just making the screen really huge and putting negative left and top parameters.Btw, I was able to figure out how to disable ALT+TAB switching by myself....woohooo. Thanks for your help WS_POPUP works for me. Copy the below code and try it.;* create a window ;* password must be entered in a certain time frame ;* or computer is shutdown #include <GUIConstants.au3> dim $password_windowID dim $labelID dim $editboxID dim $userInput dim $password $GUI_WIDTH = 800 $GUI_HEIGHT = 600 ;To center the dialog on the screen, use -1 instead of 0 for the next 2 params. $GUI_LEFT = 0 $GUI_TOP = 0 ;To use more than 1 style, use BitOR. eg: BitOR($DTS_TIMEFORMAT, $DTS_RIGHTALIGN) $GUI_STYLE = $WS_MAXIMIZE+$WS_POPUP $GUI_EXSTYLE = -1 $password_windowID=GUICreate ( "User Authorization" , $GUI_WIDTH, $GUI_HEIGHT, $GUI_LEFT, $GUI_TOP, $GUI_STYLE, $GUI_EXSTYLE) GUISetState (@SW_SHOW) ; will display the dialog box sleep(5 * 1000)<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
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