?
Solved

Restore application in windows 7

Posted on 2012-04-10
2
Medium Priority
?
1,041 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Ferruccio Accalai earned 2000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
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++.
Suggested Courses

762 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