Page 1 of 1

Mouse button-up

PostPosted: Sat Apr 02, 2011 3:38 am
by fraxzi
Dear All,


How to detect if mouse button was release after resizing window/dialog??


Kind regards,
Frances

Re: Mouse button-up

PostPosted: Sat Apr 02, 2011 11:01 am
by Enrico Maria Giordano
Try using bLButtonUp codeblock.

EMG

Re: Mouse button-up

PostPosted: Mon Apr 04, 2011 8:03 am
by fraxzi
Enrico Maria Giordano wrote:Try using bLButtonUp codeblock.

EMG



Hello Mr. Enrico,

I tried that already but it doesn't work.. after you release the mouse button after resizing window it wont fire-up..


Kind regards,
Frances

Re: Mouse button-up

PostPosted: Mon Apr 04, 2011 9:28 am
by Antonio Linares
Frances,

oWnd:bResized := { | nSizeType, nWidth, nHeight | ... }

Re: Mouse button-up

PostPosted: Tue Apr 05, 2011 12:22 am
by fraxzi
Antonio Linares wrote:Frances,

oWnd:bResized := { | nSizeType, nWidth, nHeight | ... }



Dear Mr. Antonio,

If I use bResized, a frequent resized of Crystal Reports ActiveX Viewer causes the app to hang..

I dont know how to avoid this in CRW.. but If I can execute a resize to CRW, It can prevent the hangup.

So I just need to detect when a mouse button was released after a window resized so I can resize Crystal Reports ActiveX viewer once after the window was resized.

Any other way?

Kind Regards,
Frances

Re: Mouse button-up

PostPosted: Tue Apr 05, 2011 7:40 am
by Antonio Linares
Try with aMinMaxInfo, please check FWH\samples\TestSize.prg

Re: Mouse button-up

PostPosted: Tue Apr 05, 2011 8:18 am
by fraxzi
Antonio Linares wrote:Try with aMinMaxInfo, please check FWH\samples\TestSize.prg



Dear Mr. Antonio,

I used aMinMaxInfo to limit window size. there's no problem there...

What I need is to detect mouse button-up after user resized the window.


Kind Regards,
Frances

Re: Mouse button-up

PostPosted: Tue Apr 05, 2011 8:28 am
by Antonio Linares
Frances,

You could capture the mouse, using SetCapture( hWnd ):
http://msdn.microsoft.com/en-us/library/ms646262(v=vs.85).aspx

To trap such event you may need to use: WM_NCLBUTTONUP
http://msdn.microsoft.com/en-us/library/ms645621(v=vs.85).aspx