LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Made a window with no toolbar draggable

Solved!
Go to solution

If you still want to do this, use the mouse input VIs instead of the mouse move event. This will require polling, but will give you global coords.

 

If you want to minimize the polling, you could do this by reading the mouse down event, setting the timeout to N, doing the movement code in the timeout event and using Mouse Up to reset the timeout to -1. You might have to start by getting the offset of the mouse relative to the panel (the pane and panel classes should have conversions method, which you could probably use directly in your current code, but I expect it would still be choppy).


___________________
Try to take over the world!
0 Kudos
Message 11 of 17
(1,288 Views)

Yes, I still want to do this.. I wish to remain undefeated by LabVIEW 🙂  I'll try your suggestions.

Thanks,

0 Kudos
Message 12 of 17
(1,281 Views)
Solution
Accepted by topic author Pickering

Hi Christopher,

 

Tst is correct (of course). Using the Mouse Move Event won't work very well.

 

1) You get tons of events

2) The values are buggy in my opinion

 

I captured the data from the Mouse Move Event and found that the values occasionally "back up" when moving in a constant direction. This does not seem correct.

 

Attached is an LabVIEW 2012 implementation using polling in the Timeout Event.

The Timeout value is set in the Mouse Down Event - this sets the sensitivity.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
Message 13 of 17
(1,262 Views)

Awesome, thank you!  That works much more smoothly.

0 Kudos
Message 14 of 17
(1,256 Views)

Thanks for sharing this. IT was really interesting to find a solution for this following your method.

0 Kudos
Message 15 of 17
(1,132 Views)

It works only if you move your cursor relatively slow. With dynamic use it does not work.

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 16 of 17
(1,060 Views)

@bienieck wrote:

It works only if you move your cursor relatively slow. With dynamic use it does not work.


Did you try reducing the "TO" value in the "Pane": Mouse Down event?

You could change the TO constant to a control to make it easier to experiment.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 17 of 17
(1,045 Views)