Hello,
Does anybody know how to get window handle of parent window (the main
application window) in C#. I am trying to set mdiParent of a child window in
child's Load( ). I dont know how to set it to parent container control as
the child is created by an intermediary class that doesnt keep parent's
handle or reference.
regards,
anony 4 2489
In article <OU************ **@TK2MSFTNGP11 .phx.gbl>, Ayaz Ali wrote: Hello, Does anybody know how to get window handle of parent window (the main application window) in C#. I am trying to set mdiParent of a child window in child's Load( ). I dont know how to set it to parent container control as the child is created by an intermediary class that doesnt keep parent's handle or reference.
regards, anony
Pass it through.
No, just create a class Pool (singleton) and get the value from there.
Otherwise you will have to traverse the tree of parents. I don't
know how realistic it is, because I favored one of the two approaches above.
In article <OU************ **@TK2MSFTNGP11 .phx.gbl>, Ayaz Ali wrote: Hello, Does anybody know how to get window handle of parent window (the main application window) in C#. I am trying to set mdiParent of a child window in child's Load( ). I dont know how to set it to parent container control as the child is created by an intermediary class that doesnt keep parent's handle or reference.
regards, anony
Pass it through.
No, just create a class Pool (singleton) and get the value from there.
Otherwise you will have to traverse the tree of parents. I don't
know how realistic it is, because I favored one of the two approaches above.
In article <OU************ **@TK2MSFTNGP11 .phx.gbl>, Ayaz Ali wrote: Hello, Does anybody know how to get window handle of parent window (the main application window) in C#. I am trying to set mdiParent of a child window in child's Load( ). I dont know how to set it to parent container control as the child is created by an intermediary class that doesnt keep parent's handle or reference.
regards, anony
Regex might be an overkill in this case.
String object can split its contents:
String[] fields = "a,b,c,d,ef,gh, ikl".Split(',') ;
In article <OU************ **@TK2MSFTNGP11 .phx.gbl>, Ayaz Ali wrote: Hello, Does anybody know how to get window handle of parent window (the main application window) in C#. I am trying to set mdiParent of a child window in child's Load( ). I dont know how to set it to parent container control as the child is created by an intermediary class that doesnt keep parent's handle or reference.
regards, anony
Regex might be an overkill in this case.
String object can split its contents:
String[] fields = "a,b,c,d,ef,gh, ikl".Split(',') ; This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ayaz Ali |
last post by:
Hello,
Does anybody know how to get window handle of parent window (the main
application window) in C#. I am trying to set mdiParent of a child window in
child's Load( ). I dont know how to set it to parent container control as
the child is created by an intermediary class that doesnt keep parent's
handle or reference.
regards,
anony
|
by: fragget |
last post by:
hi-
i have a custom control that can be dragged onto a form.
the control can be dragged around the form with the mouse.
i want to draw a selection box around my control when it is selected
to be dragged.
on the mouse down event of my control i want to pass the
size of the control and the location to the parent so that i can
draw a selection box around it.
|
by: Samuel R. Neff |
last post by:
I'm trying to find a good way to handle Control.InvokeRequired without
duplicating four lines of code in every function/event. Typically
what I've seen in books is this:
If InvokeRequired Then
Invoke(new EventHandler(AddressOf thisFunc), new Object() { sender,
e})
Return
End If
|
by: lotus |
last post by:
HI All..
I'm realtively new to C#.
I have MainForm which includes Parent usercontol, and this parent
usercontrol also contains child usercontrol.
MainForm --> Parent usercontrol --> child usercontrol
Parent usercontol has one button to change the child usercontorl's
variable.
|
by: hmm |
last post by:
Hi all
I have two problems:
Problem #1:
I'm using a .NET Form with the property 'FormBorderStyle' set to 'None'. The idea is to completely cover the area of that Form with a UserControl. In order to be able to move that Form around with the mouse I have to implement EventHandlers for the MouseDown, MouseUp and MouseMove event.
Now the problem I have is these Events will never be fired because the entire dialog is covered by the...
| |
by: alwayssmiling |
last post by:
Hi,
In my application, In the main form tab control is there. For this im adding a tabpage which contains a user control, this usercontrol contains many windows controls and other userdefined controls. In this Usercontrol a panel is there, which is a parent control for all reamaining controls. In this panel, a splitter control is there, in this splitter control left side i have another panel. In order to resize the controls based on the...
|
by: Martin M. Pedersen |
last post by:
Hi,
I have a program where I read a lot of user data. How can I handle
the case where the user press control-d ?
Is it possible to disable control-d or re-open the cin ?
I have made a small example which hopefully shows my problem.
Regards
Martin
|
by: gnewsgroup |
last post by:
In my user control, I would like to find a Label control in the parent
page (the page that uses my user control). I need to update that
Label.Text when something happens in the user control.
I don't want to go through the hassle of creating events in the user
control, and then let the parent handle the event.
What is the easiest way to find a control in the parent page? Right
now, I am simply manually traversing it from the user...
|
by: mentor |
last post by:
The GridView in Cotent page cause an updating event, but the handling methond won't be executed. The Row Count of the GridView is Zero, but in fact it's not zero.
Why?
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:GridView ID="gvtitles" runat="server" CssClass="wtable" AutoGenerateColumns="False" OnRowDeleting="gvDeleteItem" OnRowCancelingEdit="gvCancel"...
|
by: =?Utf-8?B?TWlrZSBDb2xsaW5z?= |
last post by:
I have a web app that when I click a menu, I load a control. On one of these
controls, I have a button that when clicked, I need to unload the control to
unload itself and load a different control in its place. I am not sure how to
do this from within a control itself. Can anyone offer any help and show me
what I am doing wrong with my code below?
//This is on one of my controls.
protected void btnSubmit_Click(object sender, EventArgs e)...
|
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...
| |
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...
|
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...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |