Jump to content

Banner Won't Appear


Recommended Posts

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: Posted Image

;***********************
; 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

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.

;***********************
; 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 by JavaScript_Freek

[center]Cookyx.com :: Simple LAN Chat[/center]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...