Can anyone explain to me what exactly the SendMessage API does?...I've read that it is used to communicate with windows or other applications, but I don't see how that can be usefull....
Printable View
Can anyone explain to me what exactly the SendMessage API does?...I've read that it is used to communicate with windows or other applications, but I don't see how that can be usefull....
All user communication and system control (opening, closing resizing, etc) to any window is done thru messages. Plus, almost anything you see on the screen - command button, listbox, etc. are also windows, so you communicate the same way with them as well.
For example, if you send WM_QUIT (a pre-defined constant) to the primary window of an app, the app will close.
There are meesages to make listboxes selecte text, delete text, and so on.
The VB coding you do completely hides all of this from you.