Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
 
Old March 13th, 2006, 09:20 AM
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

 
Old March 13th, 2006, 11:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Look into MDI (Multiple Document Interface) applications.

J
 
Old March 13th, 2006, 03:52 PM
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old March 13th, 2006, 05:28 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

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?
 
Old March 14th, 2006, 03:09 AM
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old March 14th, 2006, 11:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

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.
 
Old March 17th, 2006, 04:35 PM
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old March 18th, 2006, 01:37 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

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.




Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set a form as startup form in vb.net 2.0 mallikalapati .NET Framework 2.0 1 February 21st, 2008 09:19 AM
Close all MdiChield form from open one form/Button salman .NET Framework 2.0 6 December 10th, 2007 03:21 AM
Firefox Error when Form Floated / Form locks socoolbrewster CSS Cascading Style Sheets 5 October 6th, 2007 09:59 PM
How to refresh owner form on closing of child form akumarp2p C# 2005 0 December 22nd, 2006 10:27 AM
parent form from child form - urgent plz netfresher C# 1 November 8th, 2006 06:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.