boyesjs03 Posted February 22, 2013 Author Share Posted February 22, 2013 Basically this tutorial will show you how to create a simple label inside a picturebox that hides and shows your differ GUI aspects.First you will need to follow this tutorial.www.touchofdeathforums.com/community/index.php?/topic/118055-game-picscreen-resolution/Dont forget to:set top and left of the picScreen to 0Resize your formDelete all maps from server and client data filesAfter you have successfully made your picScreen full screen/ with no GUI you will now have to make a picturebox to hold your buttons, call this box "ButtonBox".Cut the buttons with ctrl + X then click the picture box and paste them to put them inside the control.Next create another picturebox and a label inside it.Label properties:Name: lblHideGuiCaption: Hide GUIBackground: TransparentAutosize: TruePicturebox:Name: picHideGuiAutosize: TrueThen double click the LABEL, not the picturebox and make the code look like this:```Private Sub lblHideGui_Click()If ButtonBox.Visible = False Then picInventory.Visible = True picParty.Visible = True picOptions.Visible = True picSpells.Visible = True picCharacter.Visible = True ButtonBox.Visible = True lblHideGui.Caption = "Hide GUI" txtChat.Visible = True txtMyChat.Visible = TrueElse ButtonBox.Visible = False picInventory.Visible = False picParty.Visible = False picOptions.Visible = False picSpells.Visible = False picCharacter.Visible = False txtChat.Visible = False txtMyChat.Visible = False lblHideGui.Caption = "Show GUI"End IfEnd Sub ``` Link to comment Share on other sites More sharing options...
Wortel Angels Posted February 22, 2013 Share Posted February 22, 2013 Nice short and basic Tutorial :-)All newbs here please… here can you learn already how to make stuff visible and invisible ;-)Sitting War idk why but i just see you everywhere posting comments *.* xDTheres not much time anymore and i need to do an Basics tutorial where every litte crap is explained... uff hahaIF you got skype write me you Skypename (PM) Link to comment Share on other sites More sharing options...
boyesjs03 Posted February 22, 2013 Author Share Posted February 22, 2013 I have been posting alot recently,schoolHolidays = True ThenEclipseForums.Show ;-)I dont use skype anymore D: Link to comment Share on other sites More sharing options...
meyhemm Posted June 4, 2013 Share Posted June 4, 2013 Nice! Killed two birds with one stone.Nice tut.Thanks for the link!!!! Link to comment Share on other sites More sharing options...
elementaldisaster Posted June 5, 2013 Share Posted June 5, 2013 I don't know if I've misunderstood, but I'm confused, either way.The code makes the button disappear, but at the same time you want it to change the caption to 'Show GUI'. I tested and this simply removes gui (along with the button) and then you have to re-client to get it back.I remade this using a much more cluttered method (that works for me), which is also customized to hide certain GUI, but more can be added easily.```Private Sub imgHideBar_Click()If Not picHotbar.Visible Then ' show hotkey bar picHotbar.Visible = TrueElse picHotbar.Visible = FalseEnd IfIf Not coinbox.Visible Then ' show coinbox coinbox.Visible = TrueElse coinbox.Visible = FalseEnd IfEnd Sub```*code is simply to show an example, it won't work unless you modify it to co-operate with your buttons and your GUI parts. Link to comment Share on other sites More sharing options...
Zeno Posted June 13, 2013 Share Posted June 13, 2013 Don't do it that way, booleans are magical!Use their magic! D:```Private Sub imgHideBar_Click() picInventory.Visible = Not picInventory.Visible ButtonBox.Visible = Not ButtonBox.Visible picInventory.Visible = Not picInventory.Visible picParty.Visible = Not picParty.Visible picOptions.Visible = Not picOptions.Visible picSpells.Visible = Not picSpells.Visible picCharacter.Visible = Not picCharacter.Visible txtChat.Visible = Not txtChat.Visible txtMyChat.Visible = Not txtMyChat.VisibleEnd Sub``` 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