TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
stuslaptop
NA
1
0
Button help please
Mar 23 2004 2:20 PM
I am building a test rpg in Vb.net and am in the middle of building the GUI. I managed to get my buttons to open and close a form with the same button. I used Static as when I draged and droped the new form and pressed the button again with Dim it created a new instance and I only wanted one. Now this works fine but when I press another button so for example I have the player bag and inventory open at the same time as expected they both open. If I press the bag button to close just the bag the inventory and bag both close, upon pressing the bag button again both inventory and bag open once more. Also if I press another button all open forms close I do not want them to. Public Shared btnInventroyShow As Boolean = False Public Shared btnBagShow As Boolean = False Private Sub btnGuiInventory_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGuiInventory.Click Static formInventoryShow As New Inventory If btnInventroyShow = False Then btnInventroyShow = True formInventoryShow.Show() Else btnInventroyShow = False formInventoryShow.Hide() End If End Sub Private Sub btnGuiBag_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGuiBag.Click Static formBagShow As New Bag If btnBagShow = False Then btnBagShow = True formBagShow.Show() Else btnBagShow = False formBagShow.Hide() End If End Sub http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/mdiappsmenus.asp
Reply
Answers (
0
)
Free Unmanaged Memory --- HELP!!!!!
Syntax Highlighting