Robin Posted March 27, 2009 Share Posted March 27, 2009 The button on top of ---> $Pic_1 = GUICtrlCreatePic("icon.gif", 10, 20, 102, 100) <--- does not function. Is there a way of telling the button to be on top, so it can function? If i click on a button without a pic underneath, it works 100%... Link to comment Share on other sites More sharing options...
Aceguy Posted March 27, 2009 Share Posted March 27, 2009 show us what you have programed so far [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 Link to comment Share on other sites More sharing options...
Robin Posted March 27, 2009 Author Share Posted March 27, 2009 (edited) show us what you have programed so farFunc booster() Local $BUTTON_1, $BUTTON_2, $BUTTON_3, $MSG, $var1, $font, $var2, $var3, $var4, $FILENAME, $FIND, $REPLACE, $Retval3, $Lan_adsl Local $I, $test1, $exists, $check1 $var1 = "Compiled by:" $var2 = "Me" $font = "Comic Sans MS" GUICreate("XP-Booster - V1.00", 290, 150) Opt("GUICoordMode", 1) GUICtrlCreateLabel(" Compiled by: Me", 10, 10) GUICtrlSetColor(-1, 0x3333cc) ;GUISetBkColor(0x000) TraySetState(2) ;$Pic_1 = GUICtrlCreatePic("icon.gif", 10, 20, 102, 100)<---THIS IS THE PROB $BUTTON_1 = GUICtrlCreateButton("Speedup PC?", 10, 40, 120)<--- tHIS BUTTON STANDS STILL $BUTTON_2 = GUICtrlCreateButton("Speedup Internet?", 140, 40, 140) $BUTTON_3 = GUICtrlCreateButton("Create/Restore Registry...", 80, 90, 140) $FILENAME = "c:\boot.ini" $FIND = "optin" $REPLACE = "Alwaysoff" $percentMax = 50 $pbLeft = 10 $pbTop = 130 $pbWidth = 270 $pbHeigth = 10 $pb = GUICtrlCreateProgress($pbLeft, $pbTop, $pbWidth, $pbHeigth, BitOR($WS_CLIPSIBLINGS, $PBS_SMOOTH)) GUISetState() While 1 $MSG = GUIGetMsg() Select Case $MSG = $GUI_EVENT_CLOSE ExitLoop Case $MSG = $BUTTON_1 If FileExists($FILENAME) = 1 Then $Retval3 = FileSetAttrib("C:\boot.ini", "-R+A-S-H") _ReplaceStringInFile($FILENAME, $FIND, $REPLACE) Else MsgBox(0, "Booster V1.00", "No Boot.ini or not accessable...Sure this is WIN-XP?") EndIf If FileExists($FILENAME) = 1 Then DirCreate("C:\bstr") FileInstall("Speed-xp2-xp3.reg", "c:\bstr\Speed-xp2-xp3.reg", 1) FileInstall("shellnoroam.reg", "c:\bstr\shellnoroam.reg", 1) $var3 = FileInstall("shell.reg", "c:\bstr\shell.reg", 1) If $var3 = 1 Then For $I = 0 To 100 Step 5 $test1 = GUICtrlSetData($pb, $I) RunWait("regedit /s c:\bstr\Speed-xp2-xp3.reg") RunWait("regedit /s c:\bstr\shellnoroam.reg") RunWait("regedit /s c:\bstr\shell.reg") FileDelete("c:\bstr\*.*") DirRemove("C:\bstr") Next MsgBox(0, "All Done!", "PLEASE RE-START COMPUTER!!", 10) For $I = 100 To 0 Step -10 $test1 = GUICtrlSetData($pb, $I) Next EndIf EndIf If FileExists($FILENAME) = 0 Then $check1 = MsgBox(0x4, "Question", "Do you still want to add the registry settings?") If $check1 = 6 Then DirCreate("C:\bstr") FileInstall("Speed-xp2-xp3.reg", "c:\bstr\Speed-xp2-xp3.reg", 1) FileInstall("shellnoroam.reg", "c:\bstr\shellnoroam.reg", 1) $var3 = FileInstall("shell.reg", "c:\bstr\shell.reg", 1) If $var3 = 1 Then For $I = 0 To 100 Step 5 $test1 = GUICtrlSetData($pb, $I) ;GUICtrlSetColor(-1, 32250) RunWait("regedit /s c:\bstr\Speed-xp2-xp3.reg") RunWait("regedit /s c:\bstr\shellnoroam.reg") RunWait("regedit /s c:\bstr\shell.reg") FileDelete("c:\bstr\*.*") DirRemove("C:\bstr") Next MsgBox(0, "All Done!", "PLEASE RE-START COMPUTER!!", 10) For $I = 100 To 0 Step -10 $test1 = GUICtrlSetData($pb, $I) Sleep(100) Next EndIf Else MsgBox(0, "Abort", "Aborting...", 1) EndIf EndIfits not the whole code, but will give u an idea.Basicly, any button thats on top of a bitmap/graphic doesnt buldge at all Edited March 27, 2009 by Robin Link to comment Share on other sites More sharing options...
Robin Posted March 28, 2009 Author Share Posted March 28, 2009 Func booster() Local $BUTTON_1, $BUTTON_2, $BUTTON_3, $MSG, $var1, $font, $var2, $var3, $var4, $FILENAME, $FIND, $REPLACE, $Retval3, $Lan_adsl Local $I, $test1, $exists, $check1 $var1 = "Compiled by:" $var2 = "Me" $font = "Comic Sans MS" GUICreate("XP-Booster - V1.00", 290, 150) Opt("GUICoordMode", 1) GUICtrlCreateLabel(" Compiled by: Me", 10, 10) GUICtrlSetColor(-1, 0x3333cc) ;GUISetBkColor(0x000) TraySetState(2) ;$Pic_1 = GUICtrlCreatePic("icon.gif", 10, 20, 102, 100)<---THIS IS THE PROB $BUTTON_1 = GUICtrlCreateButton("Speedup PC?", 10, 40, 120)<--- tHIS BUTTON STANDS STILL $BUTTON_2 = GUICtrlCreateButton("Speedup Internet?", 140, 40, 140) $BUTTON_3 = GUICtrlCreateButton("Create/Restore Registry...", 80, 90, 140) $FILENAME = "c:\boot.ini" $FIND = "optin" $REPLACE = "Alwaysoff" $percentMax = 50 $pbLeft = 10 $pbTop = 130 $pbWidth = 270 $pbHeigth = 10 $pb = GUICtrlCreateProgress($pbLeft, $pbTop, $pbWidth, $pbHeigth, BitOR($WS_CLIPSIBLINGS, $PBS_SMOOTH)) GUISetState() While 1 $MSG = GUIGetMsg() Select Case $MSG = $GUI_EVENT_CLOSE ExitLoop Case $MSG = $BUTTON_1 If FileExists($FILENAME) = 1 Then $Retval3 = FileSetAttrib("C:\boot.ini", "-R+A-S-H") _ReplaceStringInFile($FILENAME, $FIND, $REPLACE) Else MsgBox(0, "Booster V1.00", "No Boot.ini or not accessable...Sure this is WIN-XP?") EndIf If FileExists($FILENAME) = 1 Then DirCreate("C:\bstr") FileInstall("Speed-xp2-xp3.reg", "c:\bstr\Speed-xp2-xp3.reg", 1) FileInstall("shellnoroam.reg", "c:\bstr\shellnoroam.reg", 1) $var3 = FileInstall("shell.reg", "c:\bstr\shell.reg", 1) If $var3 = 1 Then For $I = 0 To 100 Step 5 $test1 = GUICtrlSetData($pb, $I) RunWait("regedit /s c:\bstr\Speed-xp2-xp3.reg") RunWait("regedit /s c:\bstr\shellnoroam.reg") RunWait("regedit /s c:\bstr\shell.reg") FileDelete("c:\bstr\*.*") DirRemove("C:\bstr") Next MsgBox(0, "All Done!", "PLEASE RE-START COMPUTER!!", 10) For $I = 100 To 0 Step -10 $test1 = GUICtrlSetData($pb, $I) Next EndIf EndIf If FileExists($FILENAME) = 0 Then $check1 = MsgBox(0x4, "Question", "Do you still want to add the registry settings?") If $check1 = 6 Then DirCreate("C:\bstr") FileInstall("Speed-xp2-xp3.reg", "c:\bstr\Speed-xp2-xp3.reg", 1) FileInstall("shellnoroam.reg", "c:\bstr\shellnoroam.reg", 1) $var3 = FileInstall("shell.reg", "c:\bstr\shell.reg", 1) If $var3 = 1 Then For $I = 0 To 100 Step 5 $test1 = GUICtrlSetData($pb, $I) ;GUICtrlSetColor(-1, 32250) RunWait("regedit /s c:\bstr\Speed-xp2-xp3.reg") RunWait("regedit /s c:\bstr\shellnoroam.reg") RunWait("regedit /s c:\bstr\shell.reg") FileDelete("c:\bstr\*.*") DirRemove("C:\bstr") Next MsgBox(0, "All Done!", "PLEASE RE-START COMPUTER!!", 10) For $I = 100 To 0 Step -10 $test1 = GUICtrlSetData($pb, $I) Sleep(100) Next EndIf Else MsgBox(0, "Abort", "Aborting...", 1) EndIf EndIfits not the whole code, but will give u an idea.Basicly, any button thats on top of a bitmap/graphic doesnt buldge at allAnyone?Please note, this aint the full script...im just trying to point out where i get the hassle tia Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 28, 2009 Moderators Share Posted March 28, 2009 Robin,1. Bumping yourself...and copying your own code again. :-( Please use the "Add Reply" button, not "Reply" (it is only 1cm below!)2. Please use code tags. Put [code ] before and [/code ] after the code in your post (omit the trailing spaces - they are only there so the tags display).3. And finally, from that ever useful help file:"If a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control and create it after the others controls: GuiCtrlSetState(-1,$GUI_DISABLE). "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...
TerarinK Posted March 28, 2009 Share Posted March 28, 2009 (edited) TraySetState(2) $Pic_1 = GUICtrlCreatePic("icon.gif", 10, 12, 640, 512) ;<---THIS IS THE PROB $BUTTON_1 = GUICtrlCreateButton("Speedup PC?", 10, 40, 120) ;< - - - tHIS BUTTON STANDS STILL remember you are suppose to put the x and y along with the dimension on the full picture. Edited March 28, 2009 by TerarinK 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
Robin Posted March 28, 2009 Author Share Posted March 28, 2009 Thanks guys... 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