Post a mouse event

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
clp1000
Posts: 16
Joined: Wed Jan 04, 2023 2:18 am

Post a mouse event

#1 Post by clp1000 »

Hello

Is there any way to send a Left Mouse Click to the event queue using PostAppEvent() ?
If so, please can you tell me how. Or is there another method?

Thanks
Chris

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Post a mouse event

#2 Post by Tom »

Hi, Chris.

What exactly do you want to do? Activate a button? Set the mouse somewhere? Mark a browse line?

You can send almost all of the events you find enumerated in appevent.ch, but in most cases, you need a target for the event. It's better practice to directly send the needed event (like xbeBRW_ItemMarked to force a browse line to be marked) instead of mouse- or keyboard-events. It's much better practice to activate/evaluate the slot needed, for instance the activate-slot of a pushbutton.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

clp1000
Posts: 16
Joined: Wed Jan 04, 2023 2:18 am

Re: Post a mouse event

#3 Post by clp1000 »

OK thanks

To be honest, it's some very old code and the mouse is staying part-clicked ( dragging highlight ), I just want to send a Click to the screen at a certain position to free it up
The same way we'd use the following to force ENTER to be invoked :- PostAppEvent( xbeP_Keyboard, xbeK_ENTER,, o )

Thanks
Chris

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Post a mouse event

#4 Post by rdonnay »

You could try PostAppevent(xbeM_LbUp, ... )
if PostAppEvent(xbeM_LbClick, ... ) doesn't work.
The eXpress train is coming - and it has more cars.

Post Reply