CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2001
    Posts
    11

    Center CommonDialog

    How can I center a CommonDialog control on the screen? It has no hWnd property, no Move method, and no events.

    TIA.


  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Center CommonDialog

    The commonDialog control will position itself at Left = 0, Top = 0 of its container. If you add the control to a form then display it, notice its left top edge coincides with the forms left top edge. So the solution is to insert your commonDialog control within a PictureBox or Frame container. Then moving the container will position the commonDialog box wherever you want it within your form boundries.

    John G

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