Terenz Posted March 2, 2014 Share Posted March 2, 2014 (edited) Hello guys As title, i want to create an inputbox without any border ( or a colored one of the same background color ) This is what i have: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> $Form1 = GUICreate("Form1", 287, 228, 228, 159) $Input1 = GUICtrlCreateInput("Input1", 8, 16, 121, 21, -1, 0) GUICtrlSetBkColor(-1, 0xFF0000) GUICtrlSetColor(-1, 0xFFFFFFF) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd The problem is the text is not vertically centered, maybe i'm using the wrong style. Some help? Edited March 2, 2014 by Terenz Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
JohnOne Posted March 2, 2014 Share Posted March 2, 2014 #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <StaticConstants.au3> $Form1 = GUICreate("Form1", 287, 228, 228, 159) $Input1 = GUICtrlCreateInput("Input1", 8, 16, 121, 21, $ES_CENTER, BitOr($WS_EX_WINDOWEDGE, $WS_EX_CLIENTEDGE)) GUICtrlSetBkColor(-1, 0xFF0000) GUICtrlSetColor(-1, 0xFFFFFFF) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Terenz Posted March 2, 2014 Author Share Posted March 2, 2014 (edited) No, i have write: v e r t i c a l l y centered and not horizontal, badly there is not $ES_CENTER for vertical. Yes your input is vertically centered ( like the normal one ) but have the border and i'd like it borderless or the border of the same color of the background Removing the border cause the "issue" $Input1 = GUICtrlCreateInput("Input1", 8, 16, 121, 21, Default, $WS_EX_TRANSPARENT) Edited March 2, 2014 by Terenz Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
funkey Posted March 2, 2014 Share Posted March 2, 2014 (edited) Something like that: ?? Edited March 2, 2014 by funkey Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
Terenz Posted March 2, 2014 Author Share Posted March 2, 2014 (edited) I didn''t see that Just a question. It create a new GUI for the control and return the $nInput, if i what to hide the input after the creation GuiCtrlSetState(-1 $GUI_HIDE) seems not working Edited March 2, 2014 by Terenz Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
funkey Posted March 2, 2014 Share Posted March 2, 2014 Use this for example: WinSetState(_WinAPI_GetParent(GUICtrlGetHandle($Input2)), "", @SW_HIDE) WinSetState(_WinAPI_GetParent(GUICtrlGetHandle($Input2)), "", @SW_SHOW) Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. 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