dgarrett8 Posted January 17, 2008 Share Posted January 17, 2008 Ok, I've read the help file and it really hasn't helped me out. I'm trying to add a background image to my program or " gui " but it wont work. I'm obviously screwing up and I hope you can help me out guys. This is the image im trying to get as the background http://www.messblack.com/Backgrounds/Abstract/19.jpg This is the code for my prog so far. I've experimented for a day or 2 and decided I was better off posting for help here. I don't know if I'm able to create more than one function ( haha.. ) or if I'm able to create another function inside of a existing function. expandcollapse popup#include <GuiConstants.au3> ; Create the GUI. GuiCreate("LmH ", 300, 135) GuiSetIcon( "nothing", 1) Global $defaultstatus = "Ready" Global $status $filemenu = GUICtrlCreateMenu ("&File") $fileitem = GUICtrlCreateMenuitem ("Boobs!",$filemenu) GUICtrlSetState(-1,$GUI_DISABLE) $helpmenu = GUICtrlCreateMenu ("About Us") $saveitem = GUICtrlCreateMenuitem ("Save",$filemenu) GUICtrlSetState(-1,$GUI_DISABLE) $infoitem = GUICtrlCreateMenuitem ("Info",$helpmenu) $exititem = GUICtrlCreateMenuitem ("Exit",$filemenu) $recentfilesmenu = GUICtrlCreateMenu ("Recent Files",$filemenu,1) $separator1 = GUICtrlCreateMenuitem ("",$filemenu,2); create a separator line $viewmenu = GUICtrlCreateMenu("View",-1,1); is created before "?" menu $viewstatusitem = GUICtrlCreateMenuitem ("Statusbar",$viewmenu) GUICtrlSetState(-1,$GUI_CHECKED) $Button_1 = GUICtrlCreateButton ("Begin ",25,50,107,20) GUICtrlSetState(-1,$GUI_FOCUS) $cancelbutton = GUICtrlCreateButton ("Cancel",150,50,70,20) $statuslabel = GUICtrlCreateLabel ($defaultstatus,0,165,300,16,BitOr($SS_SIMPLE,$SS_SUNKEN)) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_Event_Close Exit 0 Case $msg = $Button_1 func1() EndSelect If $msg = $viewstatusitem Then If BitAnd(GUICtrlRead($viewstatusitem),$GUI_CHECKED) = $GUI_CHECKED Then GUICtrlSetState($viewstatusitem,$GUI_UNCHECKED) GUICtrlSetState($statuslabel,$GUI_HIDE) Else GUICtrlSetState($viewstatusitem,$GUI_CHECKED) GUICtrlSetState($statuslabel,$GUI_SHOW) EndIf EndIf If $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton Or $msg = $exititem Then ExitLoop If $msg = $infoitem Then Msgbox(0,"Info","HIIIIIIIIIIIIIIIII.") WEnd Func func1() Sleep(3000); Sleep 3 seconds $i = 1 While $i <= 41 $variable = ' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<' Send($variable & @CRLF) $i += 1 Wend Exit EndFunc GUIDelete() Exit "I think, therefore I am"[size="1"]René Descartes[/size] Link to comment Share on other sites More sharing options...
dgarrett8 Posted January 18, 2008 Author Share Posted January 18, 2008 bump "I think, therefore I am"[size="1"]René Descartes[/size] Link to comment Share on other sites More sharing options...
DjDeep00 Posted January 18, 2008 Share Posted January 18, 2008 What's up with the crazy send? Enjoy.... expandcollapse popup#include <GuiConstants.au3> ; Create the GUI. $Width=300 $Height=135 GUICreate("LmH ",$Width, $Height) InetGet("http://www.messblack.com/Backgrounds/Abstract/19.jpg",@TempDir & "\Background.jpg") GUISetIcon("nothing", 1) $Pic=GUICtrlCreatePic(@TempDir & "\Background.jpg",0,0,$Width,$Height) GUICtrlSetState(-1,$GUI_DISABLE) Global $defaultstatus = "Ready" Global $status $filemenu = GUICtrlCreateMenu("&File") $fileitem = GUICtrlCreateMenuItem("Boobs!", $filemenu) GUICtrlSetState(-1, $GUI_DISABLE) $helpmenu = GUICtrlCreateMenu("About Us") $saveitem = GUICtrlCreateMenuItem("Save", $filemenu) GUICtrlSetState(-1, $GUI_DISABLE) $infoitem = GUICtrlCreateMenuItem("Info", $helpmenu) $exititem = GUICtrlCreateMenuItem("Exit", $filemenu) $recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu, 1) $separator1 = GUICtrlCreateMenuItem("", $filemenu, 2); create a separator line $viewmenu = GUICtrlCreateMenu("View", -1, 1); is created before "?" menu $viewstatusitem = GUICtrlCreateMenuItem("Statusbar", $viewmenu) GUICtrlSetState(-1, $GUI_CHECKED) $Button_1 = GUICtrlCreateButton("Begin ", 25, 50, 107, 20) GUICtrlSetState(-1, $GUI_FOCUS) $cancelbutton = GUICtrlCreateButton("Cancel", 150, 50, 70, 20) $statuslabel = GUICtrlCreateLabel($defaultstatus, 0, 100, 300, 16, BitOR($SS_SIMPLE, $SS_SUNKEN)) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_Event_Close Exit 0 Case $msg = $Button_1 func1 () Case $msg = $viewstatusitem If BitAND(GUICtrlRead($viewstatusitem), $GUI_CHECKED) = $GUI_CHECKED Then GUICtrlSetState($viewstatusitem, $GUI_UNCHECKED) GUICtrlSetState($statuslabel, $GUI_HIDE) Else GUICtrlSetState($viewstatusitem, $GUI_CHECKED) GUICtrlSetState($statuslabel, $GUI_SHOW) EndIf Case $msg = $GUI_Event_Close Or $msg = $cancelbutton Or $msg = $exititem ExitLoop Case $msg = $infoitem MsgBox(0, "Info", "HIIIIIIIIIIIIIIIII.") EndSelect WEnd Func func1 () Sleep(3000); Sleep 3 seconds $i = 1 While $i <= 41 $variable = ' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<' Send($variable & @CRLF) $i += 1 WEnd Exit EndFunc ;==>func1 Link to comment Share on other sites More sharing options...
dgarrett8 Posted January 18, 2008 Author Share Posted January 18, 2008 it floods and crashes the persons msn "I think, therefore I am"[size="1"]René Descartes[/size] Link to comment Share on other sites More sharing options...
erezlevi Posted January 18, 2008 Share Posted January 18, 2008 it floods and crashes the persons msnhi, did you download the pic to your PC? if so his lines should work:$Pic=GUICtrlCreatePic(@TempDir & "\Background.jpg",0,0,$Width,$Height)GUICtrlSetState(-1,$GUI_DISABLE)....write it this way:GuiCtrlCreatePic (c:\background.jpg,0,0,300,300) $picGUICtrlSetState(-1,$GUI_DISABLE)and work on the numbers to get it where you need. Link to comment Share on other sites More sharing options...
dgarrett8 Posted January 18, 2008 Author Share Posted January 18, 2008 thank you so much fellas "I think, therefore I am"[size="1"]René Descartes[/size] 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