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

x
?
Solved

SendMessage question

Posted on 1997-07-14
2
Medium Priority
?
205 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
[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
2 Comments
 
LVL 1

Accepted Solution

by:
ygolan earned 80 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

715 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