D
Dian
Hi all, I have a following inquiry.
Here in news group I found the sample code of how to put a window form in
FullScreen (in the style VS 2003/2005 does)
protected override void OnLoad(EventArgs e)
{
base.OnLoad (e);
Point clientTL = this.PointToScreen(new Point(ClientRectangle.X,
ClientRectangle.Y));
Point clientBR = this.PointToScreen(new Point(ClientRectangle.X +
ClientRectangle.Width, ClientRectangle.Y + ClientRectangle.Height));
Point frameTL = this.Location;
Point frameBR = new Point(this.Location.X + this.Width, this.Location.Y +
this.Height);
int topXDelta = clientTL.X - frameTL.X;
int topYDelta = clientTL.Y - frameTL.Y;
int bottomXDelta = frameBR.X - clientBR.X;
int bottomYDelta = frameBR.Y - clientBR.Y;
Rectangle newFrameBounds = Screen.GetBounds(this);
newFrameBounds.Inflate(topXDelta + bottomXDelta, topYDelta +
bottomYDelta);
newFrameBounds.Location = new Point(-topXDelta, -topYDelta);
this.MaximumSize = newFrameBounds.Size;
this.MaximizedBounds= newFrameBounds;
}
But if I want that "fullscreen" behaviour to be complete how to round that
when leave "fullscreen" mode, click on maximized button of form
that from will be not in "real" maximized state - even more form will again
in "fullscreen" mode.
If anybody has any suggestions of how this is happen in VS 2003/2005 ?
Here in news group I found the sample code of how to put a window form in
FullScreen (in the style VS 2003/2005 does)
protected override void OnLoad(EventArgs e)
{
base.OnLoad (e);
Point clientTL = this.PointToScreen(new Point(ClientRectangle.X,
ClientRectangle.Y));
Point clientBR = this.PointToScreen(new Point(ClientRectangle.X +
ClientRectangle.Width, ClientRectangle.Y + ClientRectangle.Height));
Point frameTL = this.Location;
Point frameBR = new Point(this.Location.X + this.Width, this.Location.Y +
this.Height);
int topXDelta = clientTL.X - frameTL.X;
int topYDelta = clientTL.Y - frameTL.Y;
int bottomXDelta = frameBR.X - clientBR.X;
int bottomYDelta = frameBR.Y - clientBR.Y;
Rectangle newFrameBounds = Screen.GetBounds(this);
newFrameBounds.Inflate(topXDelta + bottomXDelta, topYDelta +
bottomYDelta);
newFrameBounds.Location = new Point(-topXDelta, -topYDelta);
this.MaximumSize = newFrameBounds.Size;
this.MaximizedBounds= newFrameBounds;
}
But if I want that "fullscreen" behaviour to be complete how to round that
when leave "fullscreen" mode, click on maximized button of form
that from will be not in "real" maximized state - even more form will again
in "fullscreen" mode.
If anybody has any suggestions of how this is happen in VS 2003/2005 ?