02-23-2012 02:43 PM
how do I set the position and size of the front panel using the FPRunTimePosRunCustom method in a c# app?
Solved! Go to Solution.
02-23-2012 03:00 PM
PIFORSystemTemplateVI.FPRunTimePosRunCustom((Int16)500, (Int16)500);
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.
object.FPRunTimePosRunCustom([position], [size])
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. |
none
03-16-2012 03:35 PM
I found a solution! -Set the size and position of the front panel using the
File >> VI Properties >> Window Run-Time Position(in catagory list) >> Custom(in position drop down box),
then just either accept the current position and size(leave the check boxes checked) or set the values you want directly (uncheck the check boxes and fill in the numbers), or physically position and size the front panel and the use the "set to current position" button and the "set to current size" button. Whatever is easiest for you.
OK so it's not making use of the VI Methods(Active X) FPRunTimePosRunCustom([Position], [Size]) method but if labview want to make it to difficult to use then other ways must be found.