Sign in to follow this  
Followers 0
Caer12

Background image

4 posts in this topic

The background image for the gui I'm using is overlaying all of the text and pictures and I don't know why it's happening :"> If anyone could point me in the right direction or give me a little bit of help it would be greatly appreciated. :)

With background image

Posted Image

Without background image

Posted Image

#include <GUIConstants.au3>
#include <INet.au3>
#include <String.au3>
#include <array.au3>

;GUI
GUICreate("Qonquer Server Status",301,109)
$background = GUICtrlCreatePic ("qbackground.bmp", 0, 0, 301, 109)
GUISetState(@SW_SHOW)

Opt("GUICoordMode",2)

;SERVER STATUS
$widthCell=100
GUICtrlCreateLabel ("Server Status:", 10, 15, $widthCell)
GUICtrlSetColor(-1,0xff00)

;SEARCH FOR TEXT AND POSTS CASE
Dim $avCodes[1] = ["GIF89"]
$src1 = _INetGetSource('http://www.qonquer.com/status/status.php?link=127.0.0.1:9958')
$trm1 = StringTrimLeft($src1, 0)
$trm3 = StringTrimRight($trm1, 49)
For $i = 0 To UBound($avCodes) - 1
    $Input = $avCodes[$i]
    $Pos = _ArraySearch ($trm3, $Input)
    Select
        Case $Pos = -1
            GUICtrlCreatePic ("online.bmp",-1,5,36,18)
        Case Else
            GUICtrlCreatePic ("offline.bmp",-1,5,36,18)
    EndSelect
Next

;PLAYERS ONLINE
$src = _INetGetSource('http://69.41.179.98:9980/online.js')
$trm = StringTrimLeft($src, 17)
$trm2 = StringTrimRight($trm, 4)
GUICtrlCreateLabel ("Players Online:", -1, 10, $widthCell)
GUICtrlSetColor(-1,0xff00)
GUICtrlCreateLabel ($trm2,  -1, 5, $widthCell)

GUISetState ()

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

Share this post


Link to post
Share on other sites



From The GuiCtrlCreatePic Help File:

If a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control : GuiCtrlSetState(-1,$GUI_DISABLE).

Share this post


Link to post
Share on other sites

very usefull to me too, thank you very much!


Greets CasaCorupta

Share this post


Link to post
Share on other sites

hey thanks :).. this helped alot :P.. cheers


Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

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