Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

App get focus

Status
Not open for further replies.

BenniP

Technical User
Nov 18, 2001
39
DE
Hello, i've started a app and after the app a message box, but the message box steals the focus of the app, how could the app get the focus back?

benniP
 
Don't you want the messagebox to have focus while it's displaying? Doesn't the form get the focus when the messagebox terminates?

Please elaborate.
Lightseeker
 
By definition, a message box is modal, and will always suspend the application that initiated the message box. The only solution is to close the message box.

That being said, there are situations where its advantageous to write your own message box function, especially in un-attended operations. Used in combination with a timer, you can display your own custom message, but still allow execution to continue. If the message box is not acknowledged within some given time period, your app can log the event to a file for later review, and get rid of the box. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
thank you, for your quick answer.
i started the app (a setup) and then opened the message box with the text that the user should press ok after the setup has finished. but the idea to make my own message box is good.
thank you!

bennip
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top