Results 1 to 4 of 4

Thread: Repost from VB General - CommonDialog Position

  1. #1

    Thread Starter
    Junior Member Sarge's Avatar
    Join Date
    Sep 2001
    Location
    West Midlands, UK
    Posts
    19

    Question Repost from VB General - CommonDialog Position

    Is there a way I can control where the CommonDialog is displayed? I would like to be able to centre the dialog when it is called.

    I suspect it may be possible through the API, can anyone help?



  2. #2
    jim mcnamara
    Guest
    CommonDialog is ActiveX. All ActiveX controls have the .Left property, and the .Top property

    .Top is the offset of the top of the control from the top of ther screen, in pixels

    .Left is the distance from the left of the screen

    There is no width property, so you'll have to experiment to find the screen center.
    Code:
    dlgFile.top = (Screen.Height\2) - 3000
    dlgFile.Left = (Screen.Width\2)  -  2400

  3. #3

    Thread Starter
    Junior Member Sarge's Avatar
    Join Date
    Sep 2001
    Location
    West Midlands, UK
    Posts
    19

    Thumbs down Control Properties

    As far as I can see the CommonDialog does not have .Left or .Top properties.

    Is there a newer version of theis control that has these properties, if so, where do I get it?

    My version is VB6 SP5, the control is SP3


  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    I don't think there is any way but to have it centered...
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

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