Tulpep / Active-Directory-Object-Picker

The standard Active Directory object picker dialog for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dialog being shown in top-left of screen.

astutecat opened this issue · comments

Is it possible to include a property such as FormStartPosition or similar to control when showing the dialog in order to set its position on the screen to the center of the owner window? at the moment, the dialog always appears in the top-left of the screen.

@astutecat just before open it create a form an position it where you want.

Then past that form as the parent of your Picker.

var parent = new Form();
parent.StartPosition = FormStartPosition.CenterScreen;
DialogResult dialogResult = picker.ShowDialog(parent);

You can change the position using things like

parent = parent.StartPosition

and

parent.Location = new Point(10, 10);

Dont hesistate to tell us if you have another problem.