Here is something very strange.
I have an event structure that handles Mouse Down? for several buttons and Key Down? for the VI (among other things). The Key Down? handler looks at what was pushed and usually just passes it along without taking any action. Now, strangely, if I push a key after having clicked on a button, if the event handler passes it along then the previously clicked button will get another Mouse Down event. This works for any button, both those handled by the event structure and those which aren't, and for any key. If the Key Down? event is discarded, then the Mouse Down event isn't fired. If I step through, I see the key down event walk through and then immediately the Mouse Down event happens, as if I had just pushed a button. The source is "LabView UI" and the time is identical to the time of the key down event. This even happens if I have put focus into something else in between the actions. For example:
1) Push "GO" button
2) Click in a string control to enter some text
3) Press a key
They key pressed will NOT appear in the string control, but instead the GO button will get a mouse down event. If I press the key a second time, again it won't appear in the string control, but the button won't get another mouse down. A third key press will finally go into the string control. I monitor the focus object in my key down handler, and it is what its supposed to be (in this case, the string control). And again, this works for any button, and any intermediate control (I've done numeric, string and "nothing").
Maybe the most frustrating part of this is that I spent quite a while trying to figure out how to programmatically fire a mouse down event and couldn't find a way to do it. Now I can't turn it off.
I'd love to attach the code, but its part of a huge application that uses hardware so its a bit unwieldly to attach.
Thanks in advance for any helpful advice,
Eric