After some forms are minimized, hide the pallets from the form to the bottom right corner.ProgramGenerally, the processing of several events and properties is not displayed in the task bar. After you click minimize, the system hides the pallets in the lower right corner. Click the tray icon to bring up the program interface. (You can search by yourself for the specific method. I will not write it because it is similar)
However, a problem occurred recently when I was working on a program. Even though it was not displayed in the taskbar after the minimization, the form was reduced to the lower left corner of the screen, and the result still could not be truly hidden.
However, I found out some previously written programs. It's okay to run them. The minimum number will not be reduced to the lower left corner of the screen,CodeThe same is true ~~ It's also a matter of character --!
Currently, this problem cannot be solved using the previous method. We look forward to expert answers ....
Okay, so I went to search for some information, that is, the following code, and solved it perfectly. So I started to study wndproc...
const int wm_syscommand = 0x112; const int SC _close = 0xf060; const int SC _minimize = 0xf020; const int SC _maximize = 0xf030; protected override void wndproc (ref message m) {If (M. MSG = wm_syscommand) {If (M. wparam. toint32 () = SC _minimize) // whether to minimize the number of clicks {// write the operation code here this. visible = false; // hide the form return;} If (M. wparam. toint32 () = SC _maximize ){//.....................} if (M. wparam. toint32 () = SC _close ){//.....................}} base. wndproc (ref m);} // This function is used to capture the Minimize button event and hide the current form.