R
Rick
Gentlepeople:
With regard to the following code:
private void frmSendOrder_Load(object sender, EventArgs e)
{
if (!acceptWindowManagerPosition) {
this.Left = this.initialRight - this.Width;
this.Top = this.initialTop;
Rectangle r = Screen.FromControl(this).WorkingArea;
if (this.Left < r.Left) {
this.Left = r.Left;
}
if (this.Top < r.Top) {
this.Top = r.Top; // Point 1.
}
}
Point pt = PointToScreen(new Point(Left,Top) );
Console.WriteLine("%s", pt.ToString() );
}
At Point 1, if the dialog in question is partly off the screen to the
top, not only is Top changed, but Left is also changed. Apparently,
if I put the dialog right on the edge of the screen, Microsoft decides
to help me out and move out to where Microsoft thinks it should go.
Is this behavior documented somewhere?
Regards,
Rick
With regard to the following code:
private void frmSendOrder_Load(object sender, EventArgs e)
{
if (!acceptWindowManagerPosition) {
this.Left = this.initialRight - this.Width;
this.Top = this.initialTop;
Rectangle r = Screen.FromControl(this).WorkingArea;
if (this.Left < r.Left) {
this.Left = r.Left;
}
if (this.Top < r.Top) {
this.Top = r.Top; // Point 1.
}
}
Point pt = PointToScreen(new Point(Left,Top) );
Console.WriteLine("%s", pt.ToString() );
}
At Point 1, if the dialog in question is partly off the screen to the
top, not only is Top changed, but Left is also changed. Apparently,
if I put the dialog right on the edge of the screen, Microsoft decides
to help me out and move out to where Microsoft thinks it should go.
Is this behavior documented somewhere?
Regards,
Rick