CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2000
    Posts
    7

    Centering a ActiveX Dll's form

    How do i centre a ActiveX DLL 's form inside a main application MDI window.
    I have used the activex dll as plugin to the main application


  2. #2
    Join Date
    Apr 1999
    Location
    Netherlands
    Posts
    181

    Re: Centering a ActiveX Dll's form

    Pass the form as either a Form or an Object to the dll (not sure without checking if a form is allowed), then you can show the form using the optional parent parameter. If you've set the forms Startup position to centerowner, it should work.
    Note though that you can't put an mdi child in a dll; if you want it to act like an mdi child you need to modify the window style and make the mdi form the parent of your form.

    Crazy D @ Work :-)

  3. #3
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Centering a ActiveX Dll's form

    Just as a side note Dan Appleman (he of the WinAPI bible) wrote an excellent article in the VBPJ last march on developing an extendable MDI framework using ActiveX DLL's and forms. I lost my copy of the magazine ages ago, but just noticed that it's now freely available on the MSDN at :

    http://msdn.microsoft.com/library/pe...bpj/da0399.htm

    It's a bit heavy going, but well worth it if you want to develop an extendable MDI system. (much better than the clunky SetParent API anyway!)



    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

  4. #4
    Join Date
    Apr 1999
    Location
    Netherlands
    Posts
    181

    Re: Centering a ActiveX Dll's form

    That's a cool one Chris!

    Crazy D @ Work :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured