Solved

SendMessage question

Posted on 1997-07-14
2
180 Views
Last Modified: 2010-04-06
I just want to know what parameter use to send a message to all windows of a same delphi3 application.
0
Comment
Question by:fmichaud061597
2 Comments
 
LVL 1

Accepted Solution

by:
ygolan earned 20 total points
ID: 1338880
If all the windows are actually Delphi forms, the following code will do it :

For i := 0 to (Screen.FormCount - 1) do
  SendMessage(Screen.Forms[i].Handle, ......)

Note that you can use Screen.Forms[i].Perform(...) instead of SendMessage, this will be more efficient.

To send a message to the child windows of the forms as well, use
  Screen.Forms[i].Broadcast(...) instead.

To send a message to *all* windows of an application, including those not created as forms ar as controls in forms, you will need to use the API function EnumWindows.
0
 

Author Comment

by:fmichaud061597
ID: 1338881
Thanks for the awnser!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now