empach Posted May 1, 2013 Share Posted May 1, 2013 Any idea why my script wont allow me to click any button?? Local $gui = GUICreate("2 button gui with bk image", 400, 400) ; background picture GUICtrlCreatePic(@ScriptDir & "pic.jpg", 0, 0, 400, 400) Local $Button1 = GUICtrlCreateButton("Button1", 100, 350, 80, 30) Local $Button2 = GUICtrlCreateButton("Button2", 220, 350, 80, 30) WinFadeIn("2 button gui with bk image","") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Button1 Exit Case $Button2 Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
FireFox Posted May 1, 2013 Share Posted May 1, 2013 *sigh* Asked a million times... $iPic = GUICtrlCreatePic(@ScriptDir & "\pic.jpg", 0, 0, 400, 400) GUICtrlSetState($iPic, $GUI_DISABLE) Make a forum search next time. Br, FireFox. empach 1 Link to comment Share on other sites More sharing options...
PlayHD Posted May 1, 2013 Share Posted May 1, 2013 (edited) or_WinApi_SetParrent(GuiCtrlGetHandle($Button),GuiCtrlGetHandle($Pic))if you don't want to disable the picture.Example: http://pastebin.com/cM7HQwnr Edited May 1, 2013 by PlayHD My UDF : _WinShake, _WinSplitMy Apps : Google Guitar Bot, PuzzleGameDesign Gui : Interesting Tabs Design, RBox Project (abandoned), Animated Gui on Exit Link to comment Share on other sites More sharing options...
empach Posted May 1, 2013 Author Share Posted May 1, 2013 *sigh* Asked a million times... $iPic = GUICtrlCreatePic(@ScriptDir & "\pic.jpg", 0, 0, 400, 400) GUICtrlSetState($iPic, $GUI_DISABLE) Make a forum search next time. Br, FireFox. Thanks Firefox!! I do appreciate experts may understand the rules and ideas behind coding - but as a newbie, who still doesn't understand fully, I can only ask the far superior amongst the forums on what seems to be a trivial matter. Not much is 'obvious' for me and I still need to get to grips with it. I did search the forums for quite a few hours before succumbing to post a question, and I apologise if I offend anyone with such a basic question. Really do appreciate your help though!! PB Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 1, 2013 Moderators Share Posted May 1, 2013 empach,Do not take it personally. But it is written clearly in the Help file under GUICtrlCreatePic: "If a picture is set as a background picture, as the other controls will overlap, it is important to disable the pic control: GuiCtrlSetState(-1, $GUI_DISABLE)"Have a good day. 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...
empach Posted May 1, 2013 Author Share Posted May 1, 2013 Thanks M23, nothing personal taken!! Sometimes I can't see the wood for the trees!! 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