Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


VB.NET: Form question

This topic is 5618 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there any way I can get formb to change forma''s controls? I as trying something like: Dim instanceFormA As new forma() instanceFormA.myInteger = 0 ''myInteger is public But it didn''t chance anything. so is it possible to change forma with formb? What i''m really trying to accomplish here is, if i do this: Dim instanceFormB as new formb() instanceFormB.Show() in a button and keep clicking it, i got a billion windows. I only want it to run if that form is not open, so is there another way to check if the form is loaded or not? Otherwise i was using an integer inside forma and if its 0, load formb, and then change it to 1, now im trying to when formb is closed set the int in forma to 0, so it knows its unloaded. I hope this isn''t confusing, heh.

Share this post

Link to post
Share on other sites
Basically, any time you do new formb you create a new form - if you organize your code like this:
inside form a:

Dim instanceFormB as new formb() '' not in a method

''in a method (a button for example)

you should get the desired results.

"I woke up sweating and clutching my pillow. Thankfully the powerful and reassuring visage of Optimus Prime staring back at me from my pillow case served to ease my frayed nerves. Like the giant robotic father I never had he always knows just what to say" - Gabe, Penny-Arcade

Alexandre Moura

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!