I am using Winform. I have Resize event. When I call the event, it call itself again and again. Following is my code.
private void Form1_Resize(object sender, EventArgs e)
{
int tabHeight = 100;
this.Height = tabHeight + 20;
this.Top = (Screen.PrimaryScreen.Bounds.Height / 2) - (this.Height / 2);
}
Event call itself again and again from this.Height = tabHeight + 20;
How can I stop looping of call?