jerem488 Posted June 25, 2009 Share Posted June 25, 2009 Hello, I have an inputbox, and Iwould like to add a frame to this inputbox. I searched on the forum, but i haven't find a solution. I have seen many solutions to create animations in windows but no around windows. $hGUI = GUICreate("", 140, 22, @DesktopWidth-(140+10), @DesktopHeight-(54+22+10), $WS_POPUP, $WS_EX_TOPMOST, $hTaskbar_Wnd) $Input = GUICtrlCreateInput("", 0, 0, 140, 22) GUICtrlSetColor($Input, 0xC0C0C0) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Thanks Qui ose gagneWho Dares Win[left]CyberExploit[/left] Link to comment Share on other sites More sharing options...
Skruge Posted June 25, 2009 Share Posted June 25, 2009 I have an inputbox, and Iwould like to add a frame to this inputbox. I searched on the forum, but i haven't find a solution. I have seen many solutions to create animations in windows but no around windows.What do you mean by "frame"? Something like this? A picture of what you're trying to accomplish would help.$hGUI = GUICreate("", 150, 46, @DesktopWidth-(140+10), @DesktopHeight-(54+22+10), $WS_POPUP, $WS_EX_TOPMOST, $hTaskbar_Wnd) $Group = GUICtrlCreateGroup("Frame?", 2, 0, 146, 42) $Input = GUICtrlCreateInput("", 5, 15, 140, 22) GUICtrlSetColor($Input, 0xC0C0C0) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
jerem488 Posted June 25, 2009 Author Share Posted June 25, 2009 Like this picture. Qui ose gagneWho Dares Win[left]CyberExploit[/left] Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 25, 2009 Moderators Share Posted June 25, 2009 jerem488, Perhaps this might help? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
James Posted June 25, 2009 Share Posted June 25, 2009 (edited) This wont work because AutoIt waits till the InputBox has finished it's events, but you can probably do it using some other method: #Include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Constants.au3> $GUI = GUICreate("Form1", 633, 447, 193, 125,BitOR($WS_CLIPCHILDREN,$WS_CLIPSIBLINGS,$WS_MAXIMIZEBOX,$WS_MINIMIZEBOX)) $hInput = InputBox("", "") _WinAPI_SetWindowLong(WinGetHandle($hInput), $GWL_HWNDPARENT, $GUI) _WinAPI_SetWindowLong(WinGetHandle($hInput), $GWL_STYLE, BitOR($WS_CLIPCHILDREN,$WS_CHILD,$WS_VISIBLE,$WS_MINIMIZEBOX,$WS_SIZEBOX )) ;~ _WinAPI_SetWindowLong(WinGetHandle("AutoIt Help"), $GWL_EXSTYLE,$WS_EX_MDICHILD) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Actually, I don't think that is what you want. Edited June 25, 2009 by JamesBrooks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 25, 2009 Share Posted June 25, 2009 Like this picture. expandcollapse popup#include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <WindowsConstants.au3> #Include <WinAPI.au3> ; $hGUI = GUICreate("", 220, 62, -1, -1, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x004A84) $Input = GUICtrlCreateInput("INPUTBOX", 20, 20, 180, 22, BitOR($ES_LEFT, $ES_AUTOHSCROLL, $ES_CENTER)) _GUIRoundCorners($hGUI, 2, 2, 25, 25) GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _GUIRoundCorners($hWnd, $iX1, $iY1, $iX2, $iY2) Local $aWPos = WinGetPos($hWnd) Local $aRet = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", _ "long", $iX1, "long", $iX1, "long", $aWPos[2], "long", $aWPos[3], "long", $iX2, "long", $iY2) If IsArray($aRet) And $aRet[0] Then _ Return DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hWnd, "long", $aRet[0], "int", 1) EndFunc Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam) If $hWnd <> $hGUI Or $iMsg <> $WM_NCHITTEST Then Return $GUI_RUNDEFMSG Local $iRet = _WinAPI_DefWindowProc($hWnd, $iMsg, $iwParam, $ilParam) If $iRet = 1 Then Return 2 Return $iRet EndFunc Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
jerem488 Posted June 25, 2009 Author Share Posted June 25, 2009 .... How to say .... you are simply super ! Thank you Qui ose gagneWho Dares Win[left]CyberExploit[/left] 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