473,320 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Form1_SizeChanged .....Maximize minimize events cannot capture

JJ
I have athe following code, but nothing happens when I minimize or maximze
the form using "top right corner minimze/maximize buttons". What am I
missing!!!!! Help please!!!!!!!!!!

Thanks
JJ

private void Form1_SizeChanged(object sender, System.EventArgs e)
{
if(this.WindowState == FormWindowState.Maximized)
{
MessageBox.Show("Maximized") ;
}
else if (this.WindowState == FormWindowState.Minimized)
{
MessageBox.Show("Minimized") ;
}
}

Nov 17 '05 #1
3 3203
try this:

private void WinForm_Resize(object sender, System.EventArgs e)
{
if(this.WindowState == FormWindowState.Maximized)
{
MessageBox.Show("Maximized") ;
}
else if (this.WindowState == FormWindowState.Minimized)
{
MessageBox.Show("Minimized") ;
}
}
"JJ" <JJ@hotmail.com> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl...
I have athe following code, but nothing happens when I minimize or maximze
the form using "top right corner minimze/maximize buttons". What am I
missing!!!!! Help please!!!!!!!!!!

Thanks
JJ

private void Form1_SizeChanged(object sender, System.EventArgs e)
{
if(this.WindowState == FormWindowState.Maximized)
{
MessageBox.Show("Maximized") ;
}
else if (this.WindowState == FormWindowState.Minimized)
{
MessageBox.Show("Minimized") ;
}
}

Nov 17 '05 #2
JJ

Ergin:

I tried your code but still does not work. Please help!!!!!!!!!!!!!!!!!!!!!!
"Kostya Ergin" <ko****@erginsoft.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
try this:

private void WinForm_Resize(object sender, System.EventArgs e)
{
if(this.WindowState == FormWindowState.Maximized)
{
MessageBox.Show("Maximized") ;
}
else if (this.WindowState == FormWindowState.Minimized)
{
MessageBox.Show("Minimized") ;
}
}
"JJ" <JJ@hotmail.com> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl...
I have athe following code, but nothing happens when I minimize or maximze the form using "top right corner minimze/maximize buttons". What am I
missing!!!!! Help please!!!!!!!!!!

Thanks
JJ

private void Form1_SizeChanged(object sender, System.EventArgs e)
{
if(this.WindowState == FormWindowState.Maximized)
{
MessageBox.Show("Maximized") ;
}
else if (this.WindowState == FormWindowState.Minimized)
{
MessageBox.Show("Minimized") ;
}
}


Nov 17 '05 #3
Do you at least hit a breakpoint in the event handler if you set one? Are
you sure that you've registered with the event?

this.Resize += new System.EventHandler(this.Form1_Resize);

private void Form1_Resize(object sender, System.EventArgs e)
{
if (this.WindowState == FormWindowState.Maximized)
{
MessageBox.Show("Maximized");
}
else if (this.WindowState == FormWindowState.Minimized)
{
MessageBox.Show("Minimized") ;
}
}

--
Tim Wilson
..Net Compact Framework MVP

"JJ" <JJ@hotmail.com> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl...
I have athe following code, but nothing happens when I minimize or maximze
the form using "top right corner minimze/maximize buttons". What am I
missing!!!!! Help please!!!!!!!!!!

Thanks
JJ

private void Form1_SizeChanged(object sender, System.EventArgs e)
{
if(this.WindowState == FormWindowState.Maximized)
{
MessageBox.Show("Maximized") ;
}
else if (this.WindowState == FormWindowState.Minimized)
{
MessageBox.Show("Minimized") ;
}
}

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Colleyville Alan | last post by:
I have an app that uses Access to grab various PowerPoint slides using the followhyperlink command. I have set the PPT window to run in a minimized state: FollowHyperlink link Set oPres =...
7
by: Bhargavan | last post by:
Hey Group, When I minimize and then maximize a form (in windows application), I see a significant drop in memory usuage in the task manager. I tried to do the same thing programatically during the...
1
by: Mohan | last post by:
Hi, I am C# Beginner. I want to develop an Form Based application, form should contain the Minimize box and Help Button. When I tried, this.MaximizeBox = false;
2
by: Hide | last post by:
hi, Now, I'm creating window based applicaton. In this application, I want to put some traps(code) before form minimizing or maximizing event, but I only can get events after form minimized or...
1
by: JJ | last post by:
I have athe following code, but nothing happens when I minimize or maximze the form using "top right corner minimze/maximize icons". What am I missing!!!!! Help please!!!!!!!!!! Thanks JJ ...
0
by: Bill | last post by:
Hi I have a parent child forms. I want the close, maximize, and minimize buttons to be removed. One the child form I have set the maximize and minimize buttons to false. I have the child form...
4
by: Mark | last post by:
We have a windows 2000 server with terminal services activated. Users will connect using RDP and launch an application. Sometimes, users will minimize the application when they meant to minimize...
1
by: JDeats | last post by:
Are there events I can trap on when the user clicks on the Form maximize or minimize header bar "buttons".
4
by: EmilH | last post by:
Hi, Can anybody show me how to minimize/maximize a window dynamically? I placed buttons for each of these commands and want to place the code which will minimize and maximize the window. ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.