473,401 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

reflection? Not sure how to do this...

I have an MDI parent with 1 mdi child. I'd like to be able to run a
routine on the parent to enumerate the handled events on the child form.

Specifically, I have a control on the parent which I want to update
depending on what keydown events are handled by the child form.

Any suggestions? I've tried a couple of times to take a crack at it
using this:

Dim myAssemblies As [Assembly]() = Thread.GetDomain().GetAssemblies()

But I think I may be on the wrong path.

Thanks kindly,

================
Jordan Bowness
================

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
2 846
In article <e1**************@TK2MSFTNGP09.phx.gbl>, Jordan Bowness wrote:
I have an MDI parent with 1 mdi child. I'd like to be able to run a
routine on the parent to enumerate the handled events on the child form.

Specifically, I have a control on the parent which I want to update
depending on what keydown events are handled by the child form.

Any suggestions? I've tried a couple of times to take a crack at it
using this:

Dim myAssemblies As [Assembly]() = Thread.GetDomain().GetAssemblies()

But I think I may be on the wrong path.

Thanks kindly,

================
Jordan Bowness
================


Why not pass an instance of the parent form to the child, through a
property or even the constructor...

private parentform as form

public sub new() ' default
initializecontrols()
end sub
public sub new(byval parentform as form)
me.parentform = parentform
initializecontrols()
end sub
dim new child as new childform(me)

then your child form is free to call any methods/poperties of your
parent form.

--
Tom Shelton [MVP]
Nov 20 '05 #2
My idea here was that the custom toolbar control that I have on the
MDIParent would automatically render itself based on events being
handled by the active MDI Child.

Specifically, if the MDIChild wasn't handling certain keypress events
(fired by a control on the child form), the toolbar control on the MDI
parent would gray out certain commands.

I though doing some reflection would be an elegant way to be able to
simply add a few event handlers on any of the child forms and need not
to worry about inheriting specific properties from a different form.

If I don't hear back from anyone, I'll just assume this is a dumb idea
and do it as you suggest Tom. :o)

Thanks,
================
Jordan Bowness
================

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Frazer | last post by:
hi could any one tell me which real life senarios reflection can be used in ? thnx
6
by: Brad | last post by:
My company is setting up a deployment process for implementing .NET Windows applications. One of the standards we want the process to enforce is verifying that the assembly is built in release...
10
by: Sunny | last post by:
Hi, I have an old problem which I couldn't solve so far. Now I have found a post in that group that gave me an idea, but I can not fully understand it. The problem is: I'm trying to use a...
2
by: Jason Coyne Gaijin42 | last post by:
I have seen several people looking for a way to access the Columns collection when using the AutoGenerate = true option. Some people have gotten so far as to find the private autoGenColumnsArray...
2
by: Mark | last post by:
Am I out of my mind if I use Reflection everytime someone logs into our site to get and track the current Major/Minor/Build/Revision version that the person is viewing our site through? This...
3
by: HL | last post by:
The requirement is to send some information to other objects. The objects to whom the information has to be sent is not available at compile time. The names of the types (objects) will be provided...
7
by: BK | last post by:
I've used reflection quite a bit to launch forms, it works great, requires little coding, and allows me to launch forms from a dynamic menu. Now I have a need to instantiate any one of several...
7
by: Paul Hadfield | last post by:
Hi, I'm running into one problem with trying to call "Type.GetCustomAttributes(...)" on my reflected code. Basically - I can't trap my own custom attribute - I can only catch / identify system...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
6
by: Cralis | last post by:
Hi guys, Someone once said, 'You can do that with reflection'. I can't recall what it was I was trying to do at the time, but then he said, 'Any developer knows what reflection is...'. I kept...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.