473,698 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Talking with an open form

Hi there,
just a short question. How can I get access to a open form (is also
the MDI parent)? <FORMNAME>.<FUN CTION> does not work but I have to
call a method in the mainForm of the Application to start a
taskbar-Notification e.g.

Thanks for an short answer!

Daniel
Nov 15 '05 #1
1 1335
"Daniel Diehl" <da****@mediawo rker.net> wrote:
How can I get access to a open form (is also the
MDI parent)?
<FORMNAME>.<FUN CTION> does not work


'this.MdiParent ' retrieves the parent of an MDI child form.

You will have to cast it to the type of the parent form. For example, if
your main form's class is called frmMain, you might write:

frmMain frm = (frmMain) this.MdiParent;
frm.Text = "this will change the caption";

P.

--
www.CL4.org
Nov 15 '05 #2

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

Similar topics

3
3506
by: Jane Austine | last post by:
I need to control a command line program via python. I first tried popen2 and 3 but I couldn't find a way to talk to the subprocess interactively; that is, read some and then write some, and read some more again... (suppose controlling an interactive shell program) When I try this with popen family, it just hangs. I have to close one pipe before reading from the other. I know that there is a wonderful thing called Expect, but it's not...
1
462
by: Konstantin | last post by:
Can someone help me figure out a way to open a form only once in an MDI app. I have an MDI app that contains several forms. I use each form depending on the type of document that the user needs to see, i.e. for documents of type A, I use form A, for type B, form B, etc. Each document has a unique number. I need the app to only show one document at a time, i.e. ifthe user tries to open doc. 1 of type A, then open form A and load doc 1....
2
1152
by: Enterprise | last post by:
Hi, I need to pass information between forms. i.e. a button is clicked on one form1, form2 opens and has access to the contents of a text box of form1. Then when the form2 closes it updates the text box on form1. I know this can be done with global variables, but is there an actual way to pass a variable from one form to another and then back? Thanks
1
10077
by: petersk | last post by:
Firstly I am an older person trying to teach myself to create a project and teach myself Access VBA programming along the way. I anticipate a number of problems I will need help with but here goes with the first >From one form I want to open another form to extract data. I really want to do this with the form Hidden but initially show the form open so that I can easily check what is going on.
6
12500
by: Matthew Wieder | last post by:
I have the following requirements: Build a stand-alone C# application that asks the user to click in a cell in an Excel spreadsheet, and then displays the address of that cell in the C# application. It seems simple enough, but the problem I'm encountering is as follows: In order for the user to select the cell from Excel, they must first click once on the Excel window to give it focus and then their second click is what changes the cell...
1
908
by: Robert Bravery | last post by:
HI all, New to vb.net I need to know how to talk to a calling form from a called form. I want to change various properties of the form as well as properties of objects on that form, Ie pushbuttons texts, label texts etx. I also need to be able to call som of the objects on the calling forms events, eg to be able to call a pushbuttons click event on the calling form. The calling form is not a mdiparent, the called form is not a mdi...
2
1262
by: Robert Bravery | last post by:
HI all, New to vb.net I need to know how to talk to a calling form from a called form. I want to change various properties of the form as well as properties of objects on that form, Ie pushbuttons texts, label texts etx. I also need to be able to call som of the objects on the calling forms events, eg to be able to call a pushbuttons click event on the calling form. The calling form is not a mdiparent, the called form is not a mdi...
1
1604
by: Pumpkin Carver | last post by:
I have a form that has a listview on it and a serious of strings in the listiew. When i doubel click on the listview item it opens a new form and displays the text that i pass to the constructor. What i am trying to do now is have a previous/next button on the form i just opened and have it go through the list of items depending on whats previous or next to that item. I pretty much have the logic for that, the only issue i cant seem to...
19
19037
by: =?Utf-8?B?R3JlZw==?= | last post by:
How can I tell via code if a Form is already open. Each time my forms load I have some initialization code that runs, but if the form is already open and hidden I don't want that initialization code to run. Thus, I just want to unhide the form. My thought is eveyrtime I go to load a form I could scan through all the open forms in my project and determine whether the one I'm getting ready to load is open or not.
0
8683
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9170
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
9031
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
8904
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
8876
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6531
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
5867
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();...
2
2341
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
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.