Many times we need to send a specific message to other applications or windows itself to notify regarding some event. Windows provides a function called BroadcastSystemMessage. The BroadcastSystemMessage function sends a message to the specified recipients. The recipients can be applications, installable drivers, network drivers, system-level device drivers, or any combination of these system components. For example you can refresh explorer view, you can fire paint event for all applications and more using this function.
Here is the small example which will fire paint event for all application. To test this you can create another VB application and put breakpoint in form_paint event.
Step-By-Step example - Create a standard exe project - Add one command button - Add the following code in form1 code window |
|