I know that this is a topic that has been posted here before, but I can't come up with anything on the search. Anyways, I have two forms in two seperate projects. I am trying to get one of them to raise a click event the other form at an exact location. Nothing I have tried seems to work yet.

Here is my code:

winHwnd = FindWindow(vbNullString, "Test Form")
pos = 140000
RetVal = SendMessage(winHwnd, WM_LBUTTONDOWN, pos, 1)
RetVal = SendMessage(winHwnd, WM_LBUTTONUP, pos, 1)

If I understand correctly the position is the y as Long in the upper 4 bytes, and the x as a Long in the lower 4 bytes.

I have also tried using PostMessage instead of SendMessage.

I know that I have the correct window because I have sent it a WM_CLOSE, and it shutdown, but I can't click.

At the time that this is run, the form sending the message is the active form, and the other form is not even visible. Thanks in advance for any help.