Welcome Guest ( Log In | Click here to Register a free account now! )
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.![]() ![]() |
Mar 31 2008, 10:04 PM
Post
#1
|
|
|
Member ![]() ![]() Group: Members Posts: 24 Joined: 8-June 07 Member No.: 135,396 |
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 -------------------- |
|
|
|
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. -------------------- |
|
|
|
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? -------------------- |
|
|
|
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 -------------------- |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 20th July 2008 - 08:49 AM |