LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mouse click on hidden/transparent FP

Hi all,

 

So I'm working on making a certain vi a remote panel. However this vi is quite complex with a lot of property nodes events which makes remote panel connection can be a bit unreliable cross-site because of the amount of data being transferred. What i'm trying to do to solve this is use a secondary vi that grabs an image of the first vi's front panel at a given frequency so that any changes are seen with out having to send too much data back and forth between the server and client. Basically all we should see is the change in pixels. When a user clicks on the image on this secondary vi i would like to simulate a click on the first vi at the same co-ordinates which should give me full control. I would use the secondary vi as the remote panel instead. I'm guessing this is how remote desktop would work?

 

I have looked into simulating mouse click events using the User32.dll and it works great > http://digital.ni.com/public.nsf/allkb/9BB3211F3469623649257360000E272C

 

However my problem is that this vi may not be the top vi or may be transparent at times. So my question is, is there a way of simulating a mouse click on a specific vi even if its not on top or hidden?

 

This idea may be too crazy to work and in that case any suggestions are welcome.

 

Thanks in advance.

0 Kudos
Message 1 of 2
(2,477 Views)

I'm sure others who are more experienced than I have actually done this (or can say why this is a terrible idea), but it seems to me that the following might work and be "efficient" (in any case, it is what I'd try first before finding out why it really is a stupid idea ...):

  • On your Front Panel that you want to influence, create a cluster of either (a) all of the Controls you want to "shadow" in the Remote Panel, or (b) references to all of the Controls you want to shadow.
  • Pass the (b) Cluster (of references) or a reference to the (a) Cluster (of Controls) to the Remote Panel.
  • Put "local copies" of these controls on the Remote Front Panel.
  • When the user clicks a Local Copy, set an appropriate Value (Signalling) Property on the passed-in Reference.
  • Have an Event Loop to handle the Value change in the Host.

Bob Schor

 

P.S. -- I welcome explanations of the drawback to this scheme.  I've not used Remote Panels per se ...

0 Kudos
Message 2 of 2
(2,436 Views)