 |
| Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book:
Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 13th, 2006, 09:20 AM
|
|
Authorized User
|
|
Join Date: Mar 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
form
i have 3 forms
form 1 is the main form with some buttons and a menu strip
how can i by pushing a butten open form2 into form 1 (like a website).
i want to have 1 main form , and open all the other forms into the mainform maximised
thx
|
|

March 13th, 2006, 11:39 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
Look into MDI (Multiple Document Interface) applications.
J
|
|

March 13th, 2006, 03:52 PM
|
|
Authorized User
|
|
Join Date: Mar 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
i don't think this is it
i have e few forms whit text and data.
when i puch a button in the menu on the main form , i would like to see one of the form's open in the mainframe , but when i puch an other button the first has to close and the other has to open.
if i puch the same button more than one time , the form has to open only one time
|
|

March 13th, 2006, 05:28 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
In your first post, you state that you want all of the forms to open in the mainform. This is a characteristic of an MDI. An example of this is Microsoft Excel, Photoshop, etc. Are those applications similar to what you want?
|
|

March 14th, 2006, 03:09 AM
|
|
Authorized User
|
|
Join Date: Mar 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
no , i would like that the forms open in the main form.
with MDI the form opens everytime i puch a button , if i puch the same butten 3 time's , the same form opens 3 times.
i would like it like a website.
when i puch a button , the form opens and when i puch an other butten , the first form close's and the other opens.
if possibel
|
|

March 14th, 2006, 11:19 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
Well, you have to code for that. You will have write code to close the first form before you open the other one...but, I don't know how many times that I can tell you to look into MDI apps.
Do a search on Google and you should find some examples.
|
|

March 17th, 2006, 04:35 PM
|
|
Authorized User
|
|
Join Date: Mar 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
i found a few code's , but i get error (childform not defined)
Private Sub newToolStripMenuItem_Click( _
ByVal sender As Object, _
ByVal e As EventArgs) _
Handles newToolStripMenuItem.Click
Dim f As New ChildForm()
f.MdiParent = Me
f.Text = "Form - " + Me.MdiChildren.Length.ToString()
f.Show()
End Sub
|
|

March 18th, 2006, 01:37 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
Your error message tells you the problem, you don't have a form named "ChildForm". You have to create this form before you can use it as a child form.
|
|
 |