Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 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 February 20th, 2004, 12:24 PM
Registered User
 
Join Date: Feb 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Global instantiation of startup form

Just starting enterprise vb.net investigation. Do you have access to a global instantiation of the startup form?

Project will have a mdiForm with numerous mdichildren and some modal forms. The mdichildren know who their parent is via Parent property. If a mdichild form spawns a modal form, how can the modal form know who the startup form was?

Thanks for any help!
 
Old February 20th, 2004, 01:50 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

What are you trying to reference in the parent form?

J
 
Old February 20th, 2004, 02:27 PM
Registered User
 
Join Date: Feb 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The parent mdiform has a docking manager, toolbar manager, etc. Modal forms spawned by mdichildren may need access to data/objects in a docked pane (containing user control) on the startup form.

Currently the children are casting their parent form into the appropriate formtype and controlling show/hide of the pane. My manager thinks we should just be able to use a global instantiation of the startup form.
 
Old February 20th, 2004, 05:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

OK,

I think I understand what you are trying to do (but I may be wrong...)

However, I don't think that you need to make the whole form global, just the individual controls.

Here is a an example of a recent post with an example for accessing the properties of a textbox on a form from a different form. This can be applied to controls, dataset, etc.

http://p2p.wrox.com/topic.asp?TOPIC_ID=9924

Let me know if this doesn't help.

J
 
Old February 21st, 2004, 11:17 AM
Registered User
 
Join Date: Feb 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, many thanks!!

Your example showed the answer [form1name] -- everyone has access to the the startup form by it's name!!
 
Old February 21st, 2004, 01:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Your welcome :)

J





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
Constructors - instantiation brysora C# 2005 1 September 3rd, 2007 08:45 PM
How to get rid of everything except startup form. biglazy Access 9 March 23rd, 2006 07:33 PM
Form Startup Order NeilS21 Beginning VB 6 2 February 26th, 2004 05:44 AM





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