Sign in to follow this  
Followers 0
Damein

GuiSetState not working..?

2 posts in this topic

Argh, why am I having such issues with GUI today..?

Func _CreateGui()
 
$MainGui = GuiCreate("Team Fortress 2 Trading Post Quick-Search-Version", 900,600)
    $CurrentGui = 1
    GUISetOnEvent($GUI_EVENT_CLOSE, "_CloseGUI")
 
$ScoutButton = GuiCtrlCreateButton("Scout", 10, 400, 80, 80, $BS_BITMAP)
    GUICtrlSetImage($ScoutButton, "C:/Users/Robert/Desktop/Tf2Tp/Imgs/ScoutImage.bmp", 1)
    GUICtrlSetOnEvent($ScoutButton, "_Scout")
 
GuiSetState()
EndFunc
 

Func _Scout()
GuiSetState($MainGui,@SW_HIDE)
$CurrentGui = 2
 
$SecondaryGui = GuiCreate("Scout", 900,600)
GUISetOnEvent($GUI_EVENT_CLOSE, "_CloseGUI")
GuiSetState()
EndFunc

But the MainGui does not hide, it stays in the background, just creating the secondary one above it.


MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Share this post


Link to post
Share on other sites



I am silly, I didn't realize the backwards command would not yield an error.. why is that?

Anyways, switching them around worked ^^;

GuiSetState(@SW_HIDE,$MainGui)

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

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