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?
:p
Printable View
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?
:p
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
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
:p
I don't think there is any way but to have it centered...