Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Give the focus to my window

Posted on 1998-12-30
6
Medium Priority
?
163 Views
Last Modified: 2010-04-04
How can I get a window of my program to the front (When I click on the tray icon my program should come to the front)
?
0
Comment
Question by:Shellman
[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
6 Comments
 
LVL 5

Accepted Solution

by:
heathprovost earned 150 total points
ID: 1353867
Try this
.....your onclick code here
SetForeGroundWindow(YourForm.Handle);

Hope this helps
0
 
LVL 5

Expert Comment

by:heathprovost
ID: 1353868
Does my solution work? Waiting for a response....
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1353869
You should call
  SetForegroundWindow(Application.Handle);
and
  Application.ProcessMessages;
before displaying anything like popup menus. Only these two commands in this order will make sure that everything is fine...

Regards, Madshi.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:viktornet
ID: 1353870
You could do this...

MyForm.BringToFront;

or you could do ....

SetActiveForm(Whatever);

-Viktor
--Ivanov
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1353871
actually SetActiveWindow(Whatever); isntead of SetActiveForm(Whatever);
0
 

Author Comment

by:Shellman
ID: 1353872
Thank you. This helps.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

721 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