You will have to handle the WM_SYSCOMMAND windows message on the form,
looking for where wParam is equal to SC_MINIMIZE. You can do this by
overriding the WndProc method on the Form.
I know that it can be done in C++, but where in C#? Intellisense does'nt
show up those commands?
Rinaldo
Nicholas Paldino said:
Rinaldo,
You will have to handle the WM_SYSCOMMAND windows message on the form,
looking for where wParam is equal to SC_MINIMIZE. You can do this by
overriding the WndProc method on the Form.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Rinaldo said:
Hi,
How to regonize when the user clicks the minimize button in a form with
events?
You have to override the WndProc method on your form. The msg parameter
(of type Message) has fields which indicate the type of message it is, as
well as the lParam and wParam members.
You will have to look in the C++ header files (winuser.h most likely) or
a site like http://www.pinvoke.net to get the values for WM_SYSCOMMAND and
SC_MINIMIZE.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Rinaldo said:
Hi Nicholas,
I know that it can be done in C++, but where in C#? Intellisense does'nt
show up those commands?
Rinaldo
Nicholas Paldino said:
Rinaldo,
You will have to handle the WM_SYSCOMMAND windows message on the form,
looking for where wParam is equal to SC_MINIMIZE. You can do this by
overriding the WndProc method on the Form.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Rinaldo said:
Hi,
How to regonize when the user clicks the minimize button in a form with
events?
You will have to handle the WM_SYSCOMMAND windows message on the form,
looking for where wParam is equal to SC_MINIMIZE. You can do this by
overriding the WndProc method on the Form.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.