Tuesday, March 06, 2012 10:25 PM
Re: how do I set the position and size of the front panel using the FPRunTimePosRunCustom method in a c# app?
this didn't work which is odd because the LabVIEW help files say that I only need to enter a 16 bit integer number.
I've also tried to create 16 bit integer number variables and set them to any value and then use the variables for position and size, but that didn't work either.
Has anyone used this method or has anyone got any ideas as to how to use this method?
Requires: Base Package
Class: VI Methods (ActiveX)
Sets a custom position for the VI to move its front panel to every time the VI runs.
For single-pane front panels, minimum size refers to the content area of that pane, not including the scroll bars. For multi-pane front panels, minimum size refers to the entire front panel, including any visible scroll bars.
Name Type Description position 16-bit integer A cluster of top and left pairs that indicate the front panel window position. size 16-bit integer A cluster of height and width pairs that indicate the size in pixels of the front panel.
- Edited by scurley Monday, March 12, 2012 11:29 AM
Wednesday, March 07, 2012 5:11 AMI don't think anyone understands this question...
JP Cowboy Coders Unite!
Thursday, March 08, 2012 8:03 AMModerator
Could you provide more details about your issues please? It will be very benefit for us to help you find a solution.
MSDN Community Support | Feedback to us
Monday, March 12, 2012 11:27 AM
I'm building a machine vision app and i need to use c#/wpf for the webcam interface and main GUI but I have to use labview for the image processing.
i have sorted all the wpf/c# side but i can't get the labview front panel to be the size and position that i want because i don't know how to enter the position and size values into the method stated above.
the VI method(ActiveX) in the labview 2010 help files states that the following method should be used:
it also states that the variables used for position and size should be a cluster of Int16 pairs.
how do i enter the values for the method if c# doesn't do clusters?
I've tried arrays and they don't work, so i'm asking for help.
if you need more info let me know what info you need please.
Monday, March 12, 2012 1:04 PM
Apart from 3rd party interfaces, views, etc. In WPF, everything that is displayed is considered to be a FrameworkElement. In this base class, there are two properties Horizontal and VerticalAlignment. Set both to strech to completely fill up the container they are in.
For example you have a datagrid that has 4 regions. One region hosts your LABVIEW view. Make the control that contains the LABVIEW view a CONTENTCONTROL. Set the content control's alignments as indicated above. If the LABVIEW view still has problems you have to tell the LABVIEW control the width and heights similar to hosting a Silverlight control in a webbrowser. Many unmanged controls are hosted in ACTIVEX controls which do have height and width properties. You can experiment easily enought but JUST adding an activex control to your grid in WPF and altering these values to see the effect. The last link shows how to how WINDOWS MEDIA PLAYER. Try that sample and adjust width and height to see results.
You mention the word clusters but you don't define it. Clusters have no meaning in C# other than perhaps at the Operating System layer where there are many Systems Clustered to act as one big machine. So for position, I'm guessing that it is the postion within the ACTIVEX control itself. Leave that to position 0,0, and use the CONTENTCONTROL to render actual position.
JP Cowboy Coders Unite!
Monday, March 12, 2012 9:08 PM
Thanks, i'll check out what you've said.
Oh just so you know:
LabVIEW defines clusters as arrays of different data types.