forums Computer Tutorials Computer Help and Spyware Removal File DatabaseUninstall Database Windows Startup Programs Database Computer Resources Computer Glossary Forums Computer Help and Spyware Removal
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

 
Reply to this topicStart new topic
> Visual Basic (2005 Express), How do I..
thisismydisplayn...
post Mar 31 2008, 10:04 PM
Post #1


Member
**

Group: Members
Posts: 24
Joined: 8-June 07
Member No.: 135,396



I am a beginner in VB.

I have it so when I click on a button, it makes another form appear. It simply changes the forms "visible" property from "false" to "true" when it is clicked. How do I make this process more efficient? (I assume the form is loaded when the program is, since it only changes it's visible property, instead of opening it. How do I make it load an instance of the form?)

Once haveing done the above, how do I allow the form be able to be opened with multiple instances? Or, is that already enabled?

Also, how do I refer to a form in a folder? ie:
I have a code that is executed with an OnClick, like this "Form2.Visible = True", how do I refer to a form named "FormThis" that is in the folder "HolyFolder" ? (This code is in Form1 that is created when you start a new project.)

This post has been edited by thisismydisplayname: Mar 31 2008, 10:23 PM


--------------------
Go to the top of the page
 
+Quote Post
raw
post Apr 1 2008, 06:10 PM
Post #2


Bleeping Hacker
******

Group: BC Advisor
Posts: 1,795
Joined: 14-April 04
From: Texas
Member No.: 151



First i have to ask, why do you want to load the same form multiple times?

"FormThis" will have to be added to the project. You can not open a form from
a folder. (unless you are opening it from VB)
While this is not entirely true, the form can not be imported into the running program.

No matter how many forms you have they all become part of the executable which
is loaded in memory when you run the program. Whether they are hidden or visible
makes no difference.

If you want some example projects I am more then happy to share some of my code with you.
I wrote the Bleeping Computer screen saver and the HOSTfix program used here at BC.


--------------------
Go to the top of the page
 
+Quote Post
thisismydisplayn...
post Apr 7 2008, 03:23 PM
Post #3


Member
**

Group: Members
Posts: 24
Joined: 8-June 07
Member No.: 135,396



Yes, I would like some examples.
Well, in the IDE it showed them as being in different folders, and I believe it allowed me then to name a form the same thing as another form if they were both in different folders, but then doing the visible = yes thing would only work when referencing it as the name it was defaultly given.

Well, I want multiple instances of the same form to open up while using the program so that multiple people can keep track of their characters stats at the same time. Me and my friend got bored and made a stupid board MMORPG game thing, and I was going to make a program to do all the math for us.

How would I implement the FormThis property thing?


--------------------
Go to the top of the page
 
+Quote Post
raw
post Apr 7 2008, 07:30 PM
Post #4


Bleeping Hacker
******

Group: BC Advisor
Posts: 1,795
Joined: 14-April 04
From: Texas
Member No.: 151



Multiple people will be using the same program at the same time?
Personally I would build Form1 to call all the new forms, such as:

Form1 - Add buttons - Monster1, Monster2
Then create MonForm1, MonForm2 and use "Show" for the new forms.

Gimme a few and I will whip up some sample forms for you.

http://www.rawcreations.net/downloads/FormExp.zip

This post has been edited by raw: Apr 7 2008, 08:27 PM


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 20th July 2008 - 08:49 AM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.