FZ_PanDAForm.SetImageWindow

Sets an Image Display window

Public Shared Function SetImageWindow( _
   ByVal windowNo As Integer, _
   ByVal handle As IntPtr _
) As Integer
 
Public Shared Function SetImageWindow( _
   ByVal windowNo As Integer, _
   ByVal locationX As Integer, _
   ByVal locationY As Integer, _
   ByVal width As Integer, _
   ByVal height As Integer, _
   ByVal unitNo As Integer, _
   ByVal subNo As Integer, _
   ByVal magnification As Double, _
   ByVal originX As Integer, _
   ByVal originY As Integer, _
   ByVal update As Integer, _
   ByVal visible As Integer _
) As Integer

Parameters
windowNo
Window number
Input
handle
ImageWindowM control handle
Input
locationX
Upper left X coordinate of the window (relative coordinate on the control to which ImageWindowM control is pasted)
Input
locationY
Upper left Y coordinate of the window (relative coordinate on the control to which ImageWindowM control is pasted)
Input
width
Window width
Input
Height
Window height
Input
unitNo
Processing unit number to be displayed
Input
subNo
Sub number to be displayed
If -1 is specified, positional display mode is used, and the display target will be from the specified processing unit to the previous image-related processing unit.
Input
magnification
Display magnification
Specifies the display magnification in a real number. For example, specify "0.5" to zoom out the display to half size, or specify "2.0" to zoom in the display to double size.
If -1 is specified, display magnification will be automatically adjusted to fit to the ImageWindowM window size.
Input
originX
Upper left X coordinate of a display image relative to the window upper left coordinate
Input
originY
Upper left Y coordinate of a display image relative to the window upper left coordinate
Input
update
Update timing
0: Every time of measurement
1: Only when an overall judgement result is NG at the time of measurement
2: Only when a target processing unit is NG at the time of measurement
3: Always update (through display)
Input
visible
Display
0: Window invisible
1: Window visible
Input

Return Value
Returns 0 when the Image Display window is successfully set.
Otherwise returns a non-zero value.

Description
Sets the Image Display window.
First, associates the window number and the ImageWindowM control of the custom control.
Then, set the window details setting for that associated Image Display window. (setting is available)
Information about the set Image Display window is saved per scene.

Example
   Private Sub Form_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

       Dim mainWindow As ImageWindowM

       ' Assigns mainWindow to the window number 0
       SetImageWindow(0, mainWindow.Handle)

       ' Sets the window number 0
       SetImageWindow(0, 46, 54, 640, 480, 1, 0, -1, 0, 0, 0, 1)

   End Sub