BleepingComputer.com: Visual Basic (2005 Express)

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Visual Basic (2005 Express) How do I..

#1 User is offline   thisismydisplayname 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 24
  • Joined: 08-June 07
  • Gender:Male

Posted 31 March 2008 - 10:04 PM

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: 31 March 2008 - 10:23 PM


#2 User is offline   raw 

  • Bleeping Hacker
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,299
  • Joined: 14-April 04
  • Gender:Male
  • Location:Texas

Posted 01 April 2008 - 06:10 PM

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.
Posted Image
Posted ImageHOSTFix only works on XP,no longer maintained

#3 User is offline   thisismydisplayname 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 24
  • Joined: 08-June 07
  • Gender:Male

Posted 07 April 2008 - 03:23 PM

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?

#4 User is offline   raw 

  • Bleeping Hacker
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,299
  • Joined: 14-April 04
  • Gender:Male
  • Location:Texas

Posted 07 April 2008 - 07:30 PM

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: 07 April 2008 - 08:27 PM

Posted Image
Posted ImageHOSTFix only works on XP,no longer maintained

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users