Solved

How to bring my form to top ...

Posted on 2001-09-17
4
135 Views
Last Modified: 2010-04-06
Hi Experts,

I have an application that is always minimized. It does some checks, and when the results of those checks are negative, then my app should come in front of all the other applications that are active that moment, in order to be able to inform the user that the checks were bad.

How can this be done ?
I suppose this should be possible (and even simple to do), but I'm not able to do the trick.

Any suggestions ?
Thanx,
The Mayor.

0
Comment
Question by:wimmeyvaert
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 50 total points
ID: 6487220
try
  Application.Restore;
0
 
LVL 1

Expert Comment

by:Madmarlin
ID: 6487226
Not sure off the top pf my head and dont have a delphi program in fromnt of my but I'd check the application object.

It will be something like :

Application.Restore;
Application.BringToFront;
0
 
LVL 6

Author Comment

by:wimmeyvaert
ID: 6487257
Hi mnasman, MadMarlin,

Your suggestion works fine, but only if my mainform is minimized. How can I get the same result when my MainForm
is not minimized, but behind another application.

This is my code (only works when form is minimized) :
  if not blnGlobalResultOK then
  begin
    Application.Restore;
    Self.Show;
  end;

Can you please help me any further with this one.
I'll grant the points anyway to mnasman, because he was the first to give me a correct answer to my question.
I hope he wants to help me a bit more to solve my other little question here.

Best regards,
The Mayor.
0
 
LVL 6

Author Comment

by:wimmeyvaert
ID: 6487274
Hi there,

I just tried MadMarlins suggestion, and this seems to solve my complete problem !!

That doesn't make it easy for me to grant the points, you know.
Because both of you gave me an correct solution (and because I'm in a very good mood today ;-)), I'll give you both 50 points.

So I'm gonna grant the points for this question to mnasman (He was first after all).
In a minute I'll post a new question for MadMarlin (50 points) and if he comments it, I'll grant him the points too.

Anyway, thanx for your quick responses.
The Mayor
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

839 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