JavaScript_Freek Posted August 6, 2006 Share Posted August 6, 2006 Yup I need help again. Why won't the banner appear? Can someone please do it right so the banner appears at the very top?Banner: expandcollapse popup;*********************** ; Sample GUI Menu V2 ; Coded by: Dan ; August 2, 2006 ;Special Thanks to: gafrost, Paulie, and codemyster! ;*********************** #include <GuiConstants.au3> #include <Misc.au3> Global $oRP $name = InputBox("Log In", "Please enter your name:") ; GUI GUICreate("Sample GUI Menu V2", 400, 400) GUISetIcon(@SystemDir & "\notepad.exe", 0) $TagsPageC = GUICtrlCreateLabel('Visit Homepage', 5, 200, 100, 15, $SS_CENTER) GUICtrlSetFont($TagsPageC, 9, 400, 4) GUICtrlSetColor($TagsPageC, 0x0000ff) GUICtrlSetCursor($TagsPageC, 0) ; BANNER GuiCtrlCreatePic("http://i37.photobucket.com/albums/e91/Zombie1992/Autoit/banner.png", 0,0, 400,67) ; SLIDER GuiCtrlCreateLabel("Slider:", 235, 215) GuiCtrlCreateSlider(270, 210, 120, 30) GuiCtrlSetData(-1, 30) ; TEXT GUICtrlCreateLabel("This is the text for a Main Menu! This is the text for a Main Menu! This is the text for a Main Menu! This is the text for a Main Menu! This is the text for a Main Menu! This is the text for a Main Menu!", 10, 250, 389, 100) $label = GuiCtrlCreateLabel("Logged in as: " &$name, 150, 4, 400, 15) ;GUICtrlSetStyle (-1, $SS_RIGHT ) ; MENU $filemenu = GUICtrlCreateMenu("File") $fileitem = GUICtrlCreateMenuitem("Open...", $filemenu) $recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu) $separator1 = GUICtrlCreateMenuitem("", $filemenu) $exititem = GUICtrlCreateMenuitem("Exit", $filemenu) $helpmenu = GUICtrlCreateMenu("About") $aboutitem = GUICtrlCreateMenuitem("About", $helpmenu) ; PROGRESS BAR ProgressOn("Progress Meter", "Increments every second", "0 percent") For $i = 1 To 100 Step 10 ProgressSet($i, $i & " percent") Next ProgressSet(100, "Done", "Complete") Sleep(500) ProgressOff() ; TAB GUICtrlCreateTab(1, 0, 400, 190) GUICtrlCreateTabItem("Intro") GUICtrlCreateLabel("Welcome to Sample GUI Menu V2." & @CRLF & " " & @CRLF & "Sample Gui Program Is In Launch. This is a sample gui with features such as login, tabs, and clickable links. ", 20, 40, 385, 100) GUICtrlCreateTabItem("Info") GUICtrlCreateLabel("Todays date: " & @MON & " " & @WDAY & ", " & @YEAR & " " & @CRLF & "" & @CRLF & "So your name on the computer is: " & @UserName & "" & @CRLF & "" & @CRLF & "Screen resolution: " & @DesktopWidth & "x" & @DesktopHeight & "" & @CRLF & "" & @CRLF & "Operating System Version: " & @OSVersion & " ", 20, 40) GUICtrlCreateTabItem("AutoIt") GUICtrlCreateLabel("AutoIt Created by Jonathan Bennett. www.autoitscript.com " & @CRLF & "" & @CRLF & "Version 2: http://www.autoitscript.com/AutoIt/ " & @CRLF & "" & @CRLF & "Version 3: http://www.autoitscript.com/autoit3/", 20, 40, 385, 100) ; GUI MESSAGE LOOP GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $fileitem $file = FileOpenDialog("Choose file...", @TempDir, "All (*.*)") If @error <> 1 Then GUICtrlCreateMenuitem($file, $recentfilesmenu) Case $msg = $exititem ExitLoop Case $msg = $GUI_EVENT_CLOSE ;~ $oRP.SaveFile (@ScriptDir & "\RichText.rtf", 0) ExitLoop Case $msg = $TagsPageC Run(@ComSpec & ' /c start http://www.autoitscript.com/autoit3', '', @SW_HIDE) Case $msg = $aboutitem MsgBox(0, "About Sample GUI Menu V2", "Sample GUI Menu V2" & @CRLF & " " & @CRLF & "Created by: Javascript_Freek" & @CRLF & "" & @CRLF & "©AutoIt") Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd [center]Cookyx.com :: Simple LAN Chat[/center] Link to comment Share on other sites More sharing options...
NELyon Posted August 6, 2006 Share Posted August 6, 2006 i think it has to be a local image Link to comment Share on other sites More sharing options...
Paulie Posted August 6, 2006 Share Posted August 6, 2006 (edited) I think its cause it's a '.png' Tried it with random .Jpg and it worked fine Tried it with other random .png didn't work Edited August 6, 2006 by Paulie Link to comment Share on other sites More sharing options...
JavaScript_Freek Posted August 6, 2006 Author Share Posted August 6, 2006 No it's not that i tried that using an example of SplashImageOn. Didn't work =\ [center]Cookyx.com :: Simple LAN Chat[/center] Link to comment Share on other sites More sharing options...
Paulie Posted August 6, 2006 Share Posted August 6, 2006 No it's not that i tried that using an example of SplashImageOn. Didn't work =\The .png thing or the local image thing? Link to comment Share on other sites More sharing options...
JavaScript_Freek Posted August 6, 2006 Author Share Posted August 6, 2006 (edited) Yes the banner is a .jpg and I updated this script but it's still not appear. Help? I updated by making everyone below so banner will fit. expandcollapse popup;*********************** ; Sample GUI Menu V2 ; Coded by: Dan ; August 2, 2006 ;Special Thanks to: gafrost, Paulie, and codemyster! ;*********************** #include <GuiConstants.au3> #include <Misc.au3> Global $oRP $name = InputBox("Log In", "Please enter your name:") ; GUI GUICreate("Sample GUI Menu V2", 400, 400) GUISetIcon(@SystemDir & "\notepad.exe", 0) $TagsPageC = GUICtrlCreateLabel('Visit Homepage', 5, 399, 100, 15, $SS_CENTER) GUICtrlSetFont($TagsPageC, 9, 400, 4) GUICtrlSetColor($TagsPageC, 0x0000ff) GUICtrlSetCursor($TagsPageC, 0) ; BANNER GuiCtrlCreatePic("http://i37.photobucket.com/albums/e91/Zombie1992/Autoit/banner.jpg", 0, 0, 400,67) ; SLIDER GuiCtrlCreateLabel("Slider:", 235, 300) GuiCtrlCreateSlider(270, 294, 120, 30) GuiCtrlSetData(-1, 30) ; TEXT GUICtrlCreateLabel("This is the text for a Main Menu! This is the text for a Main Menu! This is the text for a Main Menu! This is the text for a Main Menu! This is the text for a Main Menu! This is the text for a Main MenuV2!", 10, 260, 389, 37) $label = GuiCtrlCreateLabel("Logged in as: " &$name, 130, 75, 400, 13) ;GUICtrlSetStyle (-1, $SS_RIGHT ) ; MENU $filemenu = GUICtrlCreateMenu("File") $fileitem = GUICtrlCreateMenuitem("Open...", $filemenu) $recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu) $separator1 = GUICtrlCreateMenuitem("", $filemenu) $exititem = GUICtrlCreateMenuitem("Exit", $filemenu) $helpmenu = GUICtrlCreateMenu("About") $aboutitem = GUICtrlCreateMenuitem("About", $helpmenu) ; PROGRESS BAR ProgressOn("Progress Meter", "Increments every second", "0 percent") For $i = 1 To 100 Step 10 ProgressSet($i, $i & " percent") Next ProgressSet(100, "Done", "Complete") Sleep(500) ProgressOff() ; TAB GUICtrlCreateTab(1, 70, 400, 190) GUICtrlCreateTabItem("Intro") GUICtrlCreateLabel("Welcome to Sample GUI Menu V2." & @CRLF & " " & @CRLF & "Sample Gui Program Is In Launch. This is a sample gui with features such as login, tabs, and clickable links. ", 20, 120, 385, 100) GUICtrlCreateTabItem("Info") GUICtrlCreateLabel("Todays date: " & @MON & " " & @WDAY & ", " & @YEAR & " " & @CRLF & "" & @CRLF & "So your name on the computer is: " & @UserName & "" & @CRLF & "" & @CRLF & "Screen resolution: " & @DesktopWidth & "x" & @DesktopHeight & "" & @CRLF & "" & @CRLF & "Operating System Version: " & @OSVersion & " ", 20, 120, 385, 100) GUICtrlCreateTabItem("AutoIt") GUICtrlCreateLabel("AutoIt Created by Jonathan Bennett. www.autoitscript.com " & @CRLF & "" & @CRLF & "Version 2: http://www.autoitscript.com/AutoIt/ " & @CRLF & "" & @CRLF & "Version 3: http://www.autoitscript.com/autoit3/", 20, 120, 385, 100) ; GUI MESSAGE LOOP GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $fileitem $file = FileOpenDialog("Choose file...", @TempDir, "All (*.*)") If @error <> 1 Then GUICtrlCreateMenuitem($file, $recentfilesmenu) Case $msg = $exititem ExitLoop Case $msg = $GUI_EVENT_CLOSE ;~ $oRP.SaveFile (@ScriptDir & "\RichText.rtf", 0) ExitLoop Case $msg = $TagsPageC Run(@ComSpec & ' /c start http://www.autoitscript.com/autoit3', '', @SW_HIDE) Case $msg = $aboutitem MsgBox(0, "About Sample GUI Menu V2", "Sample GUI Menu V2" & @CRLF & " " & @CRLF & "Created by: Javascript_Freek" & @CRLF & "" & @CRLF & "©AutoIt") Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Edited August 6, 2006 by JavaScript_Freek [center]Cookyx.com :: Simple LAN Chat[/center] Link to comment Share on other sites More sharing options...
NELyon Posted August 6, 2006 Share Posted August 6, 2006 i'm almost positive the image must be on your own pc Link to comment Share on other sites More sharing options...
JavaScript_Freek Posted August 6, 2006 Author Share Posted August 6, 2006 Yes it works! But dang it.. why??!?! [center]Cookyx.com :: Simple LAN Chat[/center] Link to comment Share on other sites More sharing options...
Paulie Posted August 6, 2006 Share Posted August 6, 2006 Yes it works!But dang it.. why??!?!For me the code above does not get the banner from aboveMaybe look at the Demo Gui and see how it's banner was set up 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