Window hiding and display problems Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiAPI/html/delphi_20061206130101119.html
Design Concept:
Two Program , Main program and subroutine
Click a button in the main program to hide the main program (not displayed in the taskbar) and run the subroutine at the same time;
Close the subroutine to display the main program (displayed in the taskbar ).
The problem is:
1. application. Minimize;
Showwindow (application. Handle, sw_hide );
The main program can be hidden,
Showwindow (findwindow (nil, pchar ('aaa'), sw_restore );
The main program is displayed, but the main program is not displayed in the taskbar. sw_show cannot achieve the expected results.
2. You can hide the main program once. When you click this button for the second time, the main program is still visible.
Please help me.
Showwindow (findwindow (nil, pchar ('aaa'), 1 );
To minimize the number of connections, you must recover the connection accordingly.
Showwindow (findwindow (nil, pchar ('aaa'), 1 );
Sw_shownormal is equal to 1. The problem is still the same. How can we recover it accordingly?
For a hidden main program running a sub-program, the main program is displayed when the sub-program is turned off.
How should we implement it? Is there an alternative?
Hide:
Application. Minimize ();
Showwindow (application. Handle, sw_hide );
Display:
Showwindow (application. Handle, sw_show );
Application. Restore ();
Strong brother clean ~~~~ It also solved my problem ~~
Http://community.csdn.net/Expert/TopicView1.asp? Id = 5209814
Here we will give you 1111111111 ^-^
Display:
Showwindow (application. Handle, sw_show );
Application. Restore ();
This is placed in the subroutine. The application refers to the current program. How can the application be replaced with the main window program?
Showwindow (findwindow (nil, pchar ('aaa'), sw_restore );
In this way ????