Sign in to follow this  
Followers 0
mini

HELP

5 posts in this topic

#1 ·  Posted (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

#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 by mini

Share this post


Link to post
Share on other sites



Hey,

This should work now... sry I edited the picture so that I can test it on my PC:

#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

Share this post


Link to post
Share on other sites

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:

#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

Share this post


Link to post
Share on other sites

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^^

Share this post


Link to post
Share on other sites

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 :evil:;)

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^^

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0