Solved

Restore application in windows 7

Posted on 2012-04-10
2
961 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

932 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

12 Experts available now in Live!

Get 1:1 Help Now