From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display fullscreen image with popup buttons?

I want to display fullscreen video (IMAQ WinDraw) and i want that popup buttons will be shown up when user move the mouse or press the screen (touchscreen).

I want it to act like a media player that buutons pop ups when mouse move, and fade back when mouse doesnt move.

 

And if there is no way to do this in labview. what is the easiest way to do it? (C#?)

0 Kudos
Message 1 of 4
(4,457 Views)

Easiest way:

 

Place Image Display on the Front Panel, disable image info and image tools, resize image area, then set VI properties for disable title bar, menu, scrollbars, etc. After that you can place your button over it. You can enable/disbale buttons based on Vision Display control events.

 

Andrey.

 

Message 2 of 4
(4,448 Views)

The major issues here are that the event structure doesn't work with the WindDraw window!

 

To get around this, you need to handle the events on your own. This isn't super impossible. Labview has Acquire Input functions that allow you to retrieve all the input to the Labview process (mouse events and keyboard events, etc). You can then filter these to happen ONLY when the WindDraw window is the Foremost Window (there is an IMAQ function that does this). You can also use the corresponding Windows API function (in user32.dll). Either way, make sure when you call either function you only do so once every 10ms or so (use the Wait function). Doing so more often slows down Windows for some reason.

 

After that, you can use the normal Labview front panel as the 'popup'. Simple make it hidden normally, then when the mouse moves, bring it to front. Have it have all the buttons, etc. If you want to go totally crazy you can use overlays on the WindDraw window and try to catch mouse clicks on those overlays, but that's alot of work.

 

You can configure the WindDraw window to not have titlebar and be maximized; that gets you full screen.

 

It might take a bit of work but it's not impossible!

Message 3 of 4
(4,377 Views)

The easiest would be to make a VI act as a popup window (set properties as desired), then use an event structure to register mouse enter/leave events and trigger the control panel's visible property. Often, I will put button on a tab control, add a blank page & set the tab color to transparent. Therefore the blank tab hides all the controls when not in use.

0 Kudos
Message 4 of 4
(4,010 Views)