Solved

Restore application in windows 7

Posted on 2012-04-10
2
943 Views
Last Modified: 2012-08-14
Hi, thanks for read. I'm using delphi XE and windows 7.
the problem is: i minimize my app and later i need restore my app to front again. i already tryed several tricks but nothing work.
can someone help me? thanks
0
Comment
Question by:adminmember
2 Comments
 
LVL 22

Accepted Solution

by:
Ferruccio Accalai earned 500 total points
ID: 37828103
use GetLastActivePopup to get the right window handle
from msdn: GetLastActivePopup determines which pop-up window owned by the specified window was most recently active.
so

var
MyHandle: THandle;
begin
MyHandle := GetLastActivePopup(Application.Handle);
  BringWindowToTop(MyHandle);
  if IsIconic(MyHandle) then
    ShowWindow(MyHandle, SW_RESTORE)
  else
    SetForegroundWindow(MyHandle);
end;
0
 

Author Closing Comment

by:adminmember
ID: 37828323
thank you :)
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now