Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 211
  • Last Modified:

SendMessage question

I just want to know what parameter use to send a message to all windows of a same delphi3 application.
0
fmichaud061597
Asked:
fmichaud061597
1 Solution
 
ygolanCommented:
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
 
fmichaud061597Author Commented:
Thanks for the awnser!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now