Showing Dialog Forms

G

Guest

I am trying to set the position of a Form that I show as a Dialog as follows:

dim myDialog as new Form1

myDialog.Left=200:myDialog.Right=400
myDialog.ShowDialog()

This totally ignores my left and right settings. How can I change the
position of myDialog in Code as it keeps reverting to the original Design
settings of Form1.
 
H

Herfried K. Wagner [MVP]

Dennis,

Dennis said:
I am trying to set the position of a Form that I show as a Dialog as
follows:

dim myDialog as new Form1

myDialog.Left=200:myDialog.Right=400
myDialog.ShowDialog()

This totally ignores my left and right settings. How can I change the
position of myDialog in Code as it keeps reverting to the original Design
settings of Form1.

Set the form's 'StartPosition' property to 'Manual'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Color Dialog 4
How do I show dialog boxes in Csharp? 5
Dialog owner in MDI forms 4
Refer to an Instance of a form 4
Forms and Label 8
Forms and Labels 6
compiler error 1
Pocket PC App with mulitple Forms 2

Top