|
-
Feb 6th, 2007, 11:27 PM
#1
Thread Starter
Member
how do i create a form inside a nother form
Hey guys.
Im trying to code a form
that when i press a button it will create another forum automatic.
and will also create a process on it.
any 1 got any help with this im trying and i carnt seem 2 get it.
my questions will be in vb6 or visual studios 2005 
-
Feb 6th, 2007, 11:36 PM
#2
Frenzied Member
Re: how do i create a form inside a nother form
SwInY:
I don't think you do create a form in a form or at least not without a lot of work.
Why not just add a form to your project? Project Menu>Add Form.
Then you can write whatever code you want to work with the second form.
All you would do is to open form2 when someone clicks on the button on form1.
You could also position the second form so it would hide all or part of the first form or appear beside it or whatever.
Not sure if that is what you want, but it should work
-
Feb 6th, 2007, 11:40 PM
#3
Thread Starter
Member
Re: how do i create a form inside a nother form
because i want to be able to like.
im going to start to make a hlds server watcher.
it will be watching more than 1 server
so i want to have a add a server button that will creat a nother form.
or could i possibly be able 2 write a code in the 1 thing
that will just create more process thingys.
will this affect this also i want to creat like 10 processers with like same hlds.exe
and then watch em will it be hard 2 watch that 1 process?
my questions will be in vb6 or visual studios 2005 
-
Feb 6th, 2007, 11:51 PM
#4
Frenzied Member
Re: how do i create a form inside a nother form
SwInY:
OK. Well, I still think you can do it as I suggested.
my questions will be in vb6 or visual studios 2005
The way I stated above is for VB6, but VB.Net would be almost the same.
Click Project on the menu bar then Add Windows Form.
Then, it depends on how you want the xecond form to appear.
If you want the second form to hide the first form then just give both forms the same Top/Left postion setting.
If you first form is larger and you want the second form to just appear on the first form then you will have to set the Top/Left positons accordingly.
Then in the click event of the button on your first form you would call the second form. Any code you want to execute on the second form could be in the second form's load event.
That should work, although I don't know anything about
-
Feb 6th, 2007, 11:53 PM
#5
Thread Starter
Member
Re: how do i create a form inside a nother form
i dont know how many forms the client will want tho?.
and i dont feel like creating 100 forms 2 be sure?.
and they might want all the servers running at 1nce
which means like 100 forms can be made running at 1nce?
my questions will be in vb6 or visual studios 2005 
-
Feb 7th, 2007, 02:23 AM
#6
Lively Member
Re: how do i create a form inside a nother form
hi
you can use code like this
VB Code:
Form2.TopLevel = False
form1.Controls.Add(Form2)
Form2.Dock = DockStyle.Fill
-
Feb 7th, 2007, 07:30 AM
#7
Re: how do i create a form inside a nother form
Are you sure this is the best way to do this??
It seems a little pointless creating 100 forms or however many you need. Would it not be better to have some system where they enter in a server or select it from a list for example and the information is loaded into the controls on 1 form.
They will only ever be able to look at a some information at a time anyway so you may as well keep it simple. Perhaps have some data grid that contains the essential information and can be updated as and when needed.
Just a suggestion.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|