Setting coomon dialog initial position

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Can anyone please post working sample codes in C# to show how to set the
initial position for common dialog box?

I tried to search all over the web without much luck. I did find some
reference to use windows hooks but could not get it to work to change dialog
position.

Any help will be greatly appreciated.

Thanks.
 
hi
as joey said
form1.StartPosition = FormStartPosition.Manual;
then set the location

FormStartPosition has other four enumerations ,take a look at them also

regards
ansil
 
Sorry, my fault. What I was asking is related to the common dialog such as
open/save file dialog, folder browser dialog, MesssageBox dialg etc. (Not
custom dialog I created).

I do not think those system created dialogs have the "FormStartPosition"
property. For example, one will bring up the MessageBox just by calling
MessageBox.Show.

I found on the web that this question has been asked many times (in regard
to how to do it in .NET) but no clear answers for it and very often people
get it confused with user created dialog and suggested the approaches
mentioned here by the other two posts in this thread.

Any help is greatly appreciated. Thanks.
 
Back
Top