Home > other >  How to use Unity to minimize the hidden tray, click on the tray display window
How to use Unity to minimize the hidden tray, click on the tray display window

Time:09-15

Private void notifyIcon_MouseDoubleClick (object sender, MouseEventArgs e)
{
If (e.B utton==MouseButtons. Left)
{
The Debug Log (" 123 ");
OnClickMaximize ();

}
}
OnClickMaximize (); Does not perform

CodePudding user response:

This is not a winform...
If you want to use WIN32 API on the Windows platform

CodePudding user response:

There is not minimized, check the windowed can ah

CodePudding user response:

[DllImport (" user32. DLL)]
Public static extern bool ShowWindow (IntPtr HWND, int nCmdShow);
[DllImport (" user32. DLL)]
The static extern IntPtr GetForegroundWindow ();
Const int Min=2;
Const int Max=3;
Const int Normal=1;

Then in the start function call
ShowWindow (GetForegroundWindow (), Min);


He would minimize the run
Remember to reference the namespace
  • Related