Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/Interaction with UI    [ Add a report in this area ]  
Report #:  66455   Status: Closed
ShowMessage() steals focus from calling form
Project:  Delphi Build #:  11.0.2627.5503
Version:    11.0 Submitted By:   Matthew Weiler
Report Type:  Minor failure / Design problem Date Reported:  9/5/2008 11:13:23 AM
Severity:    Commonly encountered problem Last Updated: 1/10/2010 9:13:54 PM
Platform:    All versions Internal Tracking #:  
Resolution: Cannot Reproduce (Resolution Comments) Resolved in Build: : 11.0.2902.10471
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
When I create a VCL Application in Delphi 2007, calling the ShowMessage() procedure from a form ,not being the main form, the application gives focus to the main form, then shows the message.

Once the user acknowledges the message (clicking ok, cancel, etc...), the focus "usually" returns to the calling form.

I have only tried this when calling the 2nd form using "Form2.ShowModal;"
Steps to Reproduce:
- Create a new VCL Application using Delphi 2007.
- Add a 2nd form (form2)
- Add a button to the main form (button1)
- button1.OnClick() form2.ShowModal;
- Add a button to form2 (button2)
- button2.OnClick() ShowMessage("hello");

Tomohiro Takahashi at 9/5/2008 8:51:32 PM -
Please set Project field, Version field, Area field and Build No field correctly.

Matthew Weiler at 9/10/2008 5:41:00 PM -
I'm sorry, but this is 1st time I've used this site :)

I'm not able to alter my report.
I can't seem to find a "modify" link/button.

My Delph version is: 11.0.2627.5503

Tomohiro Takahashi at 9/10/2008 11:53:40 PM -
Thanks for update. I corrected the field as Sysop.

Server Response from: ETNACODE01