DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: MDI child forms

Hybrid View

  1. #1
    Ben Guest

    MDI child forms


    Hello all,

    I have a MDI application, 1 MDI instance of a child opens another child form
    and loses focus.
    How do I reference the original child?? ie I have a grid on the original
    form and want to refence info from that grid onto my new child form. I know
    about the hwnd property of the form but that changes at run time so how do
    I know which instance of my child form created the new child form??

    Any help would be much appriciated

    Cheers
    Ben

  2. #2
    Bob Butler Guest

    Re: MDI child forms


    "Ben" <Ben@intec-systems.co.uk> wrote in message
    news:3ab787ad$1@news.devx.com...
    >
    > Hello all,
    >
    > I have a MDI application, 1 MDI instance of a child opens another child

    form
    > and loses focus.
    > How do I reference the original child?? ie I have a grid on the original
    > form and want to refence info from that grid onto my new child form. I

    know
    > about the hwnd property of the form but that changes at run time so how do
    > I know which instance of my child form created the new child form??


    If one child is creating the second child then have the first one call a
    method on the second and pass "Me" to it so that the second knows who opened
    it.




  3. #3
    Ben Guest

    Re: MDI child forms


    "Bob Butler" <butlerbob@earthlink.net> wrote:
    >
    >"Ben" <Ben@intec-systems.co.uk> wrote in message
    >news:3ab787ad$1@news.devx.com...
    >>
    >> Hello all,
    >>
    >> I have a MDI application, 1 MDI instance of a child opens another child

    >form
    >> and loses focus.
    >> How do I reference the original child?? ie I have a grid on the original
    >> form and want to refence info from that grid onto my new child form. I

    >know
    >> about the hwnd property of the form but that changes at run time so how

    do
    >> I know which instance of my child form created the new child form??

    >
    >If one child is creating the second child then have the first one call a
    >method on the second and pass "Me" to it so that the second knows who opened
    >it.
    >
    >
    >



    Cheers bob,
    but how would I actually do that? presumably you mean call the load/show
    method of the new child? but how do I pass "ME" to It??


    PS. the child form is the child of the main form not the child of the original
    child(if that makes any diff!)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center