Parent

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rino

    #1

    Parent

    How can I call word from my application as PARENT ?

    My application is a MDIparent program and when I call the Word, it isn't
    parent.....!!

    Thank's a lot ..



  • Tian Min Huang

    #2
    RE: Parent

    Hello Rino,

    There is not an easy way but calling API to set Form's parent to an
    Unmanaged Window. You may call the SetParent API via PInvoke. You may
    import it as this:

    [DllImport("user 32.dll")]
    private static extern IntPtr SetParent(
    IntPtr hWndChild, // handle to window
    IntPtr hWndNewParent // new parent window
    );

    Hope this helps.

    Regards,

    HuangTM
    Microsoft Online Partner Support
    MCSE/MCSD

    Get Secure! ¨C www.microsoft.com/security
    This posting is provided ¡°as is¡± with no warranties and confers no rights.


    Comment

    • Tian Min Huang

      #3
      RE: Parent

      Hello Rino,

      There is not an easy way but calling API to set Form's parent to an
      Unmanaged Window. You may call the SetParent API via PInvoke. You may
      import it as this:

      [DllImport("user 32.dll")]
      private static extern IntPtr SetParent(
      IntPtr hWndChild, // handle to window
      IntPtr hWndNewParent // new parent window
      );

      Hope this helps.

      Regards,

      HuangTM
      Microsoft Online Partner Support
      MCSE/MCSD

      Get Secure! ¨C www.microsoft.com/security
      This posting is provided ¡°as is¡± with no warranties and confers no rights.


      Comment

      • Tian Min Huang

        #4
        RE: Parent

        Hi Rino,

        I'd like to follow up with you and see if there is any further I can help.

        Have a nice day!

        Regards,

        HuangTM
        Microsoft Online Partner Support
        MCSE/MCSD

        Get Secure! ¨C www.microsoft.com/security
        This posting is provided ¡°as is¡± with no warranties and confers no rights.


        Comment

        Working...