473,654 Members | 3,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parent form of component

I have a form on which I drag a
self made component, it appears under the separater below the form.
When I call me.Container or me.Site in the component they return nothing,
how can I get access to the parent form?

Nov 21 '05 #1
3 1795
Look into IDesignerHost
"james henderson" <ja************ @discussions.mi crosoft.com> wrote in
message news:A1******** *************** ***********@mic rosoft.com...
I have a form on which I drag a
self made component, it appears under the separater below the form.
When I call me.Container or me.Site in the component they return nothing,
how can I get access to the parent form?

Nov 21 '05 #2
I need to get a reference to the form at runtime, not designtime

"Some Guy" wrote:
Look into IDesignerHost
"james henderson" <ja************ @discussions.mi crosoft.com> wrote in
message news:A1******** *************** ***********@mic rosoft.com...
I have a form on which I drag a
self made component, it appears under the separater below the form.
When I call me.Container or me.Site in the component they return nothing,
how can I get access to the parent form?


Nov 21 '05 #3
Since you are adding the component at design time, IDesigner can set a
reference to the form that you can use at runtime.
"james henderson" <ja************ @discussions.mi crosoft.com> wrote in
message news:CA******** *************** ***********@mic rosoft.com...
I need to get a reference to the form at runtime, not designtime

"Some Guy" wrote:
Look into IDesignerHost
"james henderson" <ja************ @discussions.mi crosoft.com> wrote in
message news:A1******** *************** ***********@mic rosoft.com...
>I have a form on which I drag a
> self made component, it appears under the separater below the form.
> When I call me.Container or me.Site in the component they return
> nothing,
> how can I get access to the parent form?
>


Nov 21 '05 #4

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

Similar topics

3
11873
by: David N | last post by:
Hi All, I just wonder if in C#, I can develop a user defined control that can call its parent function which is not yet developed. For example, how do I make my user control call a to-be-developed-function cmdOkay_Click() function as described below. 1. Create an user control that contains an OK button as below Public Class MyButton:System.Windows.Form.UserControl
3
9690
by: Maheshkumar.R | last post by:
Hi groups, How i can command over the MDI CHIlD forms created dynamically at runtime from PARENT. Let say, i have generated 5 mdichild forms, but i want to work with child form1 from MDI parent menu functions. if i select draw line in MDI parent, the line should be drawn in current active child..any URLS for this or guide me to achieve this communication... -- Mähésh Kumär. R
5
2350
by: Patrick Vanden Driessche | last post by:
Hi All, I'm currently writing an in-house Form validation framework (WinForms) which is based on 'Component'-inheriting object. So basically, I have a small hierarchy. FormValidator +-- ControlValidator +--ValidationRule
0
1351
by: ppearson3000 | last post by:
I have 2 forms.. a customer form and an addnew customer form. Basicially when you click on the addnew button, the addnew form opens. In the parent form, I add a new item using the bindingsource... and then I am passing that new item as a datarowview to a child form. In the child form, all of the controls are bound to a bindingsource component based on the customer. In the constructor for the child form, I am changing the...
0
8294
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8709
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8494
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.