child(ren) of parent form
child(ren) of parent form
child(ren) of parent form
child(ren) of parent form
child(ren) of parent form
child(ren) of parent form child(ren) of parent form child(ren) of parent form child(ren) of parent form child(ren) of parent form child(ren) of parent form child(ren) of parent form child(ren) of parent form
child(ren) of parent form child(ren) of parent form
child(ren) of parent form
Go Back  Xtreme Visual Basic Talk > > > child(ren) of parent form


Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2014, 10:59 AM
Amerigo's Avatar
Amerigo Amerigo is offline
Centurion
 
Join Date: Jan 2009
Location: USA
Posts: 175
Question child(ren) of parent form


I am creating a usercontrol. Of couse I/it doesn't know what app(s) it will be used in at this point.
I have:
Code:
Public WithEvents MyParent As Form
and
Code:
Private Sub me_Load(sender As Object, e As EventArgs) Handles Me.Load
MyParent = DirectCast(Me.FindForm, Form)
'do stuff
then
Code:
Private Sub MyParent_Load(sender As Object, e As EventArgs) Handles MyParent.Load
'do stuff
Now, how do I access any child forms (or sub forms?) launched by MyParent?
__________________
Amerigo
Reply With Quote
  #2  
Old 09-13-2014, 02:00 AM
PlausiblyDamp's Avatar
PlausiblyDampchild(ren) of parent form PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

What does your control need to do with the parent form of the other children of the parent form?

Normally you wouldn't expect a control on a form to have that kind of access to the form it is on, never mind other forms related to the form it is on.

If you can give an example of what you are trying to do there may be a better approach to the problem.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #3  
Old 09-13-2014, 01:14 PM
Gruff's Avatar
Gruffchild(ren) of parent form Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default

I have to agree with PD. Your question makes no sense.

Describe what your user control is trying to do.

---

If you are trying to make a user control that cusomizes a form somehow you might be be better off creating a custom form by inheriting from standard form instead.
__________________
Burn the land and boil the sea
You can't take the sky from me


~T
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
child(ren) of parent form
child(ren) of parent form
child(ren) of parent form child(ren) of parent form
child(ren) of parent form
child(ren) of parent form
child(ren) of parent form child(ren) of parent form child(ren) of parent form child(ren) of parent form child(ren) of parent form child(ren) of parent form child(ren) of parent form
child(ren) of parent form
child(ren) of parent form
 
child(ren) of parent form
child(ren) of parent form
 
-->