eMac Posted March 19, 2008 Posted March 19, 2008 I have a simple window GUI. It contains the GuiCreate, and a GuiCtrlCreateEdit box with predefined text in it. When my program first opens, I get the title bar in a light grey, as if my window is not selected, or the parent window, yet, when I click on the title bar, it turns darker like it's active finally. When I click in the Edit section, the title bar goes grey again. Also noticing that when I first open the program up, ALL the predefined text in the GuiCtrlCreateEdit is HIGHLIGHTED automatically. Is there a way to make my program (the single window) active on program startup and the text NOT highlight? Making it active when if I click in the edit area? Codename: Source ProgrammerWhat Is Codename: Source? A community designed operating system based off of the Windows OS. Source brings the ideas of the community to life as each user brings his or her own ideas into the development of this project.
Aceguy Posted March 19, 2008 Posted March 19, 2008 (edited) Could you post the code use [;code] paste here [;/code] (no;) Edited March 19, 2008 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock
eMac Posted March 19, 2008 Author Posted March 19, 2008 (edited) expandcollapse popup#include <GuiConstants.au3> $Main_GUI = GuiCreate("Changelog (Admin Control Panel)", 400, 350); Width, Height GuiCtrlCreatePic("logo.gif",0,0,0,0) _GuiCtrlCreateSeperator(0, 2, 310, 3, 396) $Exit_Button = GUICtrlCreateButton("Exit", 325, 320, 60) $version = GuiCtrlCreateLabel("Changelog v1.0.1550", 10, 325, 300, 60) ; CREATE GUI **************************************************************************** $ChildGui_1 = GuiCreate("Child window 3", 400, 300, 5, 5, $WS_POPUP) $LabelGui1 = GUICtrlCreateEdit("Version 2.3" & @CRLF & @CRLF & "- Added ""Client Information"" section." _ & @CRLF & "- Added Blogs, Classifieds, Forums to ""Manage"" section." _ & @CRLF & "- Added top updates section + date + logout feature." _ & @CRLF & "- Added version display." _ & @CRLF & "- Added cell_bg.gif image to top cell of sections." _ & @CRLF & "- Enchanced ""Mystic Blue"" theme." _ & @CRLF & "- Fixed moderator console broken images" _ & @CRLF & "----------------------------------" _ , 0, 100, 390, 290, $SS_SUNKEN, $WS_EX_STATICEDGE+$WS_EX_CLIENTEDGE) DllCall("user32.dll", "int", "SetParent", "hwnd", $ChildGui_1, "hwnd", $Main_GUI) GUISetState(@SW_SHOW, $Main_GUI) GUISetState(@SW_SHOW, $ChildGui_1) While 1 $Msg = GUIGetMsg(1) Switch $Msg[0] Case $GUI_EVENT_CLOSE, $Exit_Button If $Msg[0] = $Exit_Button Or _WinIsVisible($ChildGui_1) Then $Ask = _MsgBox(256+52, "Attention", "Are you sure you want to exit the changelog now?", $Msg[1]) If $Ask <> 6 Then ContinueLoop EndIf If $Msg[1] = $Main_GUI Then Exit WinActivate($Main_GUI) EndSwitch WEnd Func _GuiCtrlCreateSeperator($Direction, $Left, $Top, $Width=3, $Lenght=25) Switch $Direction Case 0 GUICtrlCreateLabel("", $Left, $Top, $Lenght, $Width, $SS_SUNKEN) Case 1 GUICtrlCreateLabel("", $Left, $Top, $Width, $Lenght, $SS_SUNKEN) EndSwitch EndFunc Func _MsgBox($MsgBoxType, $MsgBoxTitle, $MsgBoxText, $MainGUI=0) Local $iRet = DllCall ("user32.dll", "int", "MessageBox", _ "hwnd", $MainGUI, _ "str", $MsgBoxText , _ "str", $MsgBoxTitle, _ "int", $MsgBoxType) Return $iRet[0] EndFunc Func _WinIsVisible($hWnd) Return BitAND(WinGetState($hWnd), 2) EndFunc Edited March 19, 2008 by eMac Codename: Source ProgrammerWhat Is Codename: Source? A community designed operating system based off of the Windows OS. Source brings the ideas of the community to life as each user brings his or her own ideas into the development of this project.
rasim Posted March 19, 2008 Posted March 19, 2008 Sorry, i don`t understand why need to create two GUI? Just create one GUI with Edit control.
eMac Posted March 19, 2008 Author Posted March 19, 2008 because when I am done, it is going to have several more boxes that you will click over on, hiding one gui to show another (like a wizard)Sorry, i don`t understand why need to create two GUI? Just create one GUI with Edit control. Codename: Source ProgrammerWhat Is Codename: Source? A community designed operating system based off of the Windows OS. Source brings the ideas of the community to life as each user brings his or her own ideas into the development of this project.
BrettF Posted March 19, 2008 Posted March 19, 2008 because when I am done, it is going to have several more boxes that you will click over on, hiding one gui to show another (like a wizard)Just disable and hide the uneeded controls... Much easier IMO. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
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