Hiding and displaying windows

Source: Internet
Author: User
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 ????

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.