473,651 Members | 2,630 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access to MDIparent object control

hi there,
as I said, I have a MDIparent and childforms.
Now I create a new class file which is not belong to childforms. My problem
is how can I access to the MDIparent's public control(ie:a label in parent
form) object without create an instance of the parent form.
Nov 15 '05 #1
1 2800
You must pass a reference to the MDIparent instance to the instance of your
other class.
Your other class can then hold that reference as a field and use it whenever
you want (as long as the form instance is still valid).

-Rob Teixeira [MVP]

"pei_world" <pe*******@hotm ail.com> wrote in message
news:Ow******** ******@tk2msftn gp13.phx.gbl...
hi there,
as I said, I have a MDIparent and childforms.
Now I create a new class file which is not belong to childforms. My problem is how can I access to the MDIparent's public control(ie:a label in parent
form) object without create an instance of the parent form.

Nov 15 '05 #2

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

Similar topics

4
1460
by: Vaughn | last post by:
When I pass a reference to my current form, frm_x, when I create and show another form, frm_y, do I have access to all of the public methods, controls, members, etc.. of frm_x from frm_y? In my code, I pass the reference like this: private void btn_ListEmp_Click(object sender, System.EventArgs e) { frm_EmpList frm_empList = new frm_EmpList(this); frm_empList.MdiParent = this.MdiParent; frm_empList.Show();
1
1783
by: Lucas Graf | last post by:
This sounds so easy to me and feel like an idiot that I can't figure it out, but....how can I have a MDI child access it's parents control(s)?? Seems like it should be as easy as making the controls on the parent public, so i created a new project real quick w/2 forms. One is the MDIParent container and then one child form. On the MDIParent i put a textbox (textbox1) and set it to public. From the child code I just try to do a...
26
1946
by: Paul Mars | last post by:
FormParent load opens FormChildA. FormChildA btn click opens FormChildB. (FormChildA and FormChildB are both children of FormParent) (FormChildA and FormChildB are different forms) Problem: FormChildA btn click can only open one instance for FormChildB. I need multiple instances of FormChildB. Any suggestions or ideas please.
3
5330
by: Sarang | last post by:
Hi, I have this code that makes the form as an MDIChild: chartWindowController.GetForm().MdiParent = _expertTradeMainFrm; chartWindowController.GetForm().WindowState =FormWindowState.Normal; chartWindowController.GetForm().Show();
0
1643
by: kardiss | last post by:
I am trying to add Meebo's "Pop-out" kinda feature to my application which when a button is pressed in a MdiChild form, it kicks that MdiChild form out of the MdiParent boundary and acts like a SDI form of itself. When a button is pressed again, it is kicked back into the parent form. Everything is working fine except one problem. When the MdiChild form is kicked back into the form, I have to click the title bar of each MdiChild form to...
0
1532
by: =?Utf-8?B?UnVieSBOYWRsZXI=?= | last post by:
Hi everyone, i am trying to set control on mdi form from mdi child: trying to set toolstrip on mdi parent (MDIMain) from child form doing this way on the child form: ToolStrip Tool = ((MDIMain)this.MdiParent).toolStrip; Tool.Enabled = false; or this way ((MDIMain)this.MdiParent).toolStrip.Enabled = false;
8
5252
by: JonnyBlaze | last post by:
Hi Guys - This is my first C# app, but I have some knowledge of a bunch of languages like VB6 and PHP, so I'm picking it up rather quickly. I've been pulling my hair out on this one for about 4 hours now. I have a DirectoryInfo on my parent form: (extra bits chopped out...) public partial class frmMain : Form { public DirectoryInfo diTemp;
6
2412
by: Wesley Peace | last post by:
I hate to cross post, but I've gotten no answer yet on a problem I'm having with visual studio 2008. I've created a series of forms with controls to access a Access database tables. The connection string works fine and the tables are added to the project without a problem. When I create the tables they appear to bind and I am able to preview the data in the database in design mode; however, at runtime no data is displayed and the...
7
11106
by: swatii | last post by:
I am using C#.net.My problem is that I have a MDI Parent form and on that I have menustrip control which i have disabled at the time of load of MDI parent.Now I have MDI child login form. Now If the valid user sign in then only that menustrip should be enabled. I used the below code on the "signin" button click event. MDIparent form1=new MDIparent(); form1.menustrip1.enabled=true; (modifier of menustrip is public). But this code is not...
0
8695
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
8460
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
7296
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...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4281
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
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
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
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.