crackmunky Posted June 2, 2009 Author Share Posted June 2, 2009 Heya guys, Made this very simple peice of code for my game, perhaps some of you may find it usefull. I would reccomend using this too -http://www.touchofdeathforums.com/smf/index.php/topic,28926.msg254134.html#msg2541341\. Firstly make Command button or label, its up to you, Once you have decided draw it anywhere on your forms canvas -[![](http://img5.imageshack.us/img5/3237/tutorial1l.jpg)](http://img5.imageshack.us/my.php?image=tutorial1l.jpg)2\. Now double click it object you just placed to enter the code view, now enter the following code within that sub.``` If txtChat.Visible = True Then txtChat.Visible = False Else If txtChat.Visible = False Then txtChat.Visible = True End If```You now have a handy button to display/hide you chat box :) Link to comment Share on other sites More sharing options...
Robin Posted June 2, 2009 Share Posted June 2, 2009 Your code is quite long for such a simple action.Replace the if statement with:```txt.Chat.visible = not txt.Chat.visible``` Link to comment Share on other sites More sharing options...
vrage Posted June 2, 2009 Share Posted June 2, 2009 @Robin:> Your code is quite long for such a simple action.> > Replace the if statement with:> ```> txt.Chat.visible = not txt.Chat.visible> ```I literally rofled at that Link to comment Share on other sites More sharing options...
Robin Posted June 2, 2009 Share Posted June 2, 2009 And why's that? Link to comment Share on other sites More sharing options...
vrage Posted June 2, 2009 Share Posted June 2, 2009 thats because he wasted half a page and you wasted 1 line.. 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