mini Posted December 17, 2009 Posted December 17, 2009 (edited) SORRY PPL I FORGGOT TO PUT THE REST OF THE TITLE THREAD hello ppl, i got a back ground pic on my prog, but the Label's and Group's put a gray on top of the image, how can i put it with out that gray area and how can i put the back ground iamge to be see on others PC's if they dont have my pic on the folder of theyr computers. heres my code expandcollapse popup#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Form1", 402, 372) $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\ras00l\My Documents\My Pictures\iBot_starter_background.JPG", 0, 0, 403, 373, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;Labels / Groups. GUICtrlCreateGroup("Pre-Config", 16, 208, 377, 145) GUICtrlCreateGroup("Account Info", 16, 48, 377, 145) ;Buttons. $Button_Start = GUICtrlCreateButton("Start", 8, 8, 73, 25, 0) $Button_Stop = GUICtrlCreateButton("Stop", 88, 8, 73, 25, 0) $Button_SaveTemp = GUICtrlCreateButton("Save Temp Files", 168, 8, 97, 25, 0) $Button_Help = GUICtrlCreateButton("Help", 272, 8, 57, 25, 0) $Button_Exit = GUICtrlCreateButton("Exit", 336, 8, 57, 25, 0) $Button_DelTempFiles = GUICtrlCreateButton("Del Temp Files", 288, 128, 91, 25, 0) $Button_Searchibot = GUICtrlCreateButton("Search", 24, 256, 75, 25, 0) $Button_SearchLoader = GUICtrlCreateButton("Search", 24, 320, 75, 25, 0) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _Check4CLOSEClicked() EndSwitch WEnd Func _Check4CLOSEClicked();Exit $answer = MsgBox(4, "Wanning", "Are you soure?", 8 ) If $answer = 6 Then Exit EndIf EndFunc thx for all the help, i've been looking no the help file, but didnt found my question. Edited December 17, 2009 by mini [size="4"]My first work[/size], it checks if one prograrm is running and if not it closes all necessery windows and run them again.[size="4"]My second work[/size], Script Function: It saves a Client Info and creates a INI file for all clients with all the info.[size="4"]My third work[/size], Script Function: It change some INFO on a working program, every X min configured.
BennyBB Posted December 17, 2009 Posted December 17, 2009 Hey, This should work now... sry I edited the picture so that I can test it on my PC: expandcollapse popup#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Form1", 402, 372) $Pic1 = GUICtrlCreatePic("C:\Users\Benny\Desktop\DSC00101.JPG", 0, 0, 403,372, BitOR($SS_NOTIFY,$WS_GROUP));,$WS_CLIPSIBLINGS)) GUICtrlSetState(-1,$GUI_DISABLE) #EndRegion ### END Koda GUI section ### ;Labels / Groups. GUICtrlCreateGroup("Pre-Config", 16, 208, 377, 145) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT ) GUICtrlCreateGroup("Account Info", 16, 48, 377, 145) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT ) ;Buttons. $Button_Start = GUICtrlCreateButton("Start", 8, 8, 73, 25, 0) $Button_Stop = GUICtrlCreateButton("Stop", 88, 8, 73, 25, 0) $Button_SaveTemp = GUICtrlCreateButton("Save Temp Files", 168, 8, 97, 25, 0) $Button_Help = GUICtrlCreateButton("Help", 272, 8, 57, 25, 0) $Button_Exit = GUICtrlCreateButton("Exit", 336, 8, 57, 25, 0) $Button_DelTempFiles = GUICtrlCreateButton("Del Temp Files", 288, 128, 91, 25, 0) $Button_Searchibot = GUICtrlCreateButton("Search", 24, 256, 75, 25, 0) $Button_SearchLoader = GUICtrlCreateButton("Search", 24, 320, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _Check4CLOSEClicked() EndSwitch WEnd Func _Check4CLOSEClicked();Exit $answer = MsgBox(4, "Wanning", "Are you soure?", 8 ) If $answer = 6 Then Exit EndIf EndFunc But please next time, use the Helpfile: 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). This is not enough for Tab or Listview control which behave differently. In this case you need to create the picture with the $WS_CLIPSIBLINGS style, GuiCtrlSetState(-1,$GUI_ONTOP) is necessary for the Tab or Listview control. And now to your second question: If you want that the picture is also seen on pc's which normaly do not have the picture, I would advise you to put the script AND the picture into a zip file and then you should add this line in your code : $pic = GuiCtrlCreatePic(@ScriptDir & "\" & --Picturename-- ,left,top,width,height,.....) (This is not tested, but I think it should work ) Benny
mini Posted December 17, 2009 Author Posted December 17, 2009 THX Bunny, it works now... gona check on Autoit Help file for that "function" i spent all day looking for that... some times i dont understand the "help" from autoit help files... or i dont get what i want on the Search. Sow if i want to put the pic on others PC's, i just zip the 2 files!! i can put the code like this after unzip: $pic = GuiCtrlCreatePic(@ScriptDir & "\BackGround\" & bk.jgp ,0,0,402,372);;this part i dont understand;; --->>BitOR($SS_NOTIFY,$WS_GROUP));,$WS_CLIPSIBLINGS))<<---wht does this do, on my code i dont have this. Hey, This should work now... sry I edited the picture so that I can test it on my PC: expandcollapse popup#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Form1", 402, 372) $Pic1 = GUICtrlCreatePic("C:\Users\Benny\Desktop\DSC00101.JPG", 0, 0, 403,372, BitOR($SS_NOTIFY,$WS_GROUP));,$WS_CLIPSIBLINGS)) GUICtrlSetState(-1,$GUI_DISABLE) #EndRegion ### END Koda GUI section ### ;Labels / Groups. GUICtrlCreateGroup("Pre-Config", 16, 208, 377, 145) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT ) GUICtrlCreateGroup("Account Info", 16, 48, 377, 145) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT ) ;Buttons. $Button_Start = GUICtrlCreateButton("Start", 8, 8, 73, 25, 0) $Button_Stop = GUICtrlCreateButton("Stop", 88, 8, 73, 25, 0) $Button_SaveTemp = GUICtrlCreateButton("Save Temp Files", 168, 8, 97, 25, 0) $Button_Help = GUICtrlCreateButton("Help", 272, 8, 57, 25, 0) $Button_Exit = GUICtrlCreateButton("Exit", 336, 8, 57, 25, 0) $Button_DelTempFiles = GUICtrlCreateButton("Del Temp Files", 288, 128, 91, 25, 0) $Button_Searchibot = GUICtrlCreateButton("Search", 24, 256, 75, 25, 0) $Button_SearchLoader = GUICtrlCreateButton("Search", 24, 320, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _Check4CLOSEClicked() EndSwitch WEnd Func _Check4CLOSEClicked();Exit $answer = MsgBox(4, "Wanning", "Are you soure?", 8 ) If $answer = 6 Then Exit EndIf EndFunc But please next time, use the Helpfile: And now to your second question: If you want that the picture is also seen on pc's which normaly do not have the picture, I would advise you to put the script AND the picture into a zip file and then you should add this line in your code : $pic = GuiCtrlCreatePic(@ScriptDir & "\" & --Picturename-- ,left,top,width,height,.....) (This is not tested, but I think it should work ) Benny [size="4"]My first work[/size], it checks if one prograrm is running and if not it closes all necessery windows and run them again.[size="4"]My second work[/size], Script Function: It saves a Client Info and creates a INI file for all clients with all the info.[size="4"]My third work[/size], Script Function: It change some INFO on a working program, every X min configured.
BennyBB Posted December 17, 2009 Posted December 17, 2009 THX Bunny, it works now... gona check on Autoit Help file for that "function" i spent all day looking for that... some times i dont understand the "help" from autoit help files... or i dont get what i want on the Search. Sow if i want to put the pic on others PC's, i just zip the 2 files!! i can put the code like this after unzip: $pic = GuiCtrlCreatePic(@ScriptDir & "\BackGround\" & bk.jgp ,0,0,402,372);;this part i dont understand;; --->>BitOR($SS_NOTIFY,$WS_GROUP));,$WS_CLIPSIBLINGS))<<---wht does this do, on my code i dont have this. It was in your code: $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\ras00l\My Documents\My Pictures\iBot_starter_background.JPG", 0, 0, 403, 373, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))<---- your original code I commented it out, because it's just useful if you have tab or listview items in your gui. and about the zip file... I THINK it should work, I've never tested it and i've never done it since now^^
mini Posted December 17, 2009 Author Posted December 17, 2009 ok. i dont have no tabs, my main code dont have that. i where making one from "Koda" to make tests to see what was going on with my script, "koda" dont put that "Disable" line on the script. thx alot for your help It was in your code: $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\ras00l\My Documents\My Pictures\iBot_starter_background.JPG", 0, 0, 403, 373, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))<---- your original code I commented it out, because it's just useful if you have tab or listview items in your gui. and about the zip file... I THINK it should work, I've never tested it and i've never done it since now^^ [size="4"]My first work[/size], it checks if one prograrm is running and if not it closes all necessery windows and run them again.[size="4"]My second work[/size], Script Function: It saves a Client Info and creates a INI file for all clients with all the info.[size="4"]My third work[/size], Script Function: It change some INFO on a working program, every X min configured.
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