How can I respond to mouse unclick in mapinfo using mapbasic? Is there any event triggered when the mouse in unclicked? For example at the end of drawing a line when the mouse button is released.
CommandInfo() is a useful function which retains all information pertaining to recent events in MapBasic. I cannot remember, off hand, all of the items it returns, but I'd check that for a starting point
I have just looked at this, and you need to use the CommandInfo() function thus:
This only applies if the toolbutton was defined with a draw mode that allows dragging, e.g., DM_CUSTOM_LINE.
As far as I know it's not possible to constantly listen for a mouseup event (it's usually called mouseup, not unclick).
However you can create a custom tool which you can then use to capture mouse clicks on mapper windows. This is what Hairy is getting at in his answer.
It's not quite the same thing but it's as close as you're going to get.
Some untested example code: