06-07-2010 02:26 PM
I am currently developing a UI application that uses the NI-IMAQdx runtime libraries to interface to a GigEVision compliant camera.
I am using the NationalInstruments.Vision.WindowsForm.ImageViewer object to display the streaming video.
The issue I have encountered is with context menu is that right-clicking on the viewing region wont display the context menu. However, right-clicking on the ImageViewers tool bar (located at the bottom) will cause the context menu to display.
Is this a bug? I know there are a few out there with respect to the ImageViewer not resizing properly, so I am wondering if this is also an issue for anyone else.
Thank you,
-Tom
06-08-2010 03:13 PM
Hey Tom,
Are you using VB .NET or Visual Studio?
I tried running a shipping example in .NET and was not able to replicate the issue.
06-08-2010 03:44 PM
Andy,
Sorry I should have specified.
I am using C# in VS 2008.
06-09-2010 06:58 AM
Which example are you using to test this?
Of the examples I have tried, not seem to have a context menu attached to the ImageViewer.
Thank you.
06-09-2010 03:57 PM
06-14-2010 07:44 AM
Current Software Versions according to the MAX:
NI-IMAQ 4.4
NI-IMAQ I/O 2.3.1
NI-IMAQdx 3.6
NI-PAL 2.5.3
NI-RIO 3.4
In terms of added references, this is the versions I am currently using:
NationalInstruments.Common Version 8.7.35.131
NationalInstruments.Vision.Acquisition.Imaqdx Version 3.40.35.49153
NationalInstruments.Vision.Common Version 9.0.35.45000
As far as code goes, there really isn't any to speak of. In the VS environment I create a context menu, named it, then added it to the ContextMenu property of the ImageViewer. The context menu appears when I right-click on the toolbar at the bottom of the ImageViewer, but not when I right-click on the actual image.
Thank you.
06-15-2010 05:11 PM
Hi Tom,
I was able to reproduce this behavior in VS 2008 with the IMAQ Grab example (with a context menu added). It only shows up when you click the borders that aren't covered up by the image portion. The question now, is whether this is expected behavior, or if this is a bug. I'll research into this some more, and post back with what I find.
Cheers,
06-16-2010 05:55 AM
Thank you for the help, I am glad you were able to reproduce the error.
In my opinion, this is not the intended behavior, at least not from a UI perspective. Also, when using the NI Measurement & Automation Software (MAX), it uses what appears to be a similiar ImageViewer and the context menu appears regardless of where on the ImageViewer the user right-clicks. This is an indication that this is a bug (one of a few...) in the ImageViewer object.
Thank you again and I look forward to hearing what you discover.
06-17-2010 10:55 AM
Hello Tom,
We have escalated this issue to the R&D group and we should hear back from them shortly. In the mean time, if you were to use CWIMAQViewer, you would be able to see the menu.
06-17-2010 11:45 AM
Thanks Andy.
It looks like CWIMAQViewer is a control in a different assembly and I do not want to add an assembly reference to my application only for the viewer. Besides that the CWIMAQViewer does not deal with VisionImage objects and all my code is written around VisionImage.
This is a non-critical bug that we will have to deal with until it is fixed (assuming it does in fact get fixed).
Let me know the results from R&D.