Re: Problem changing the size property in the Resize event
- From: "Truong Hong Thi" <thi1981@xxxxxxxxx>
- Date: 6 Dec 2005 20:29:22 -0800
The problem might be because you reset Size, the event is reentered. I
did not try it, you'll have to debug it to see.
The following snippet should work as you expected:
private void Form1_Resize(object sender, System.EventArgs e)
{
if (WindowState != FormWindowState.Normal) return;
if (Height != _previousSize.Height)
{
Width = Height;
}
else
{
Height = Width;
}
_previousSize = this.Size;
}
Thi
.
- References:
- Problem changing the size property in the Resize event
- From: BB
- Re: Problem changing the size property in the Resize event
- From: Truong Hong Thi
- Problem changing the size property in the Resize event
- Prev by Date: Re: Handling System Shutdown in a WindowsForms App
- Next by Date: Re: Best Way to Check for Dataset Changes
- Previous by thread: Re: Problem changing the size property in the Resize event
- Next by thread: Custom Control ClipRegion Question
- Index(es):
Relevant Pages
|