HOW TO DISPLAY IMAGES IN PICTUREBOX INSTEAD OF IN A SEPARATE WINDOW (WHEN USING THE INCLUDED SDK)

How to display images in PictureBox instead of in a separate window (when using the included SDK)

 

If you use the SDK sample program as is, the video will be displayed in a separate window.
If you want to display it in a PictureBox within a Form, please refer to the page below in the API manual.

int iCube SDK_Start (int nCamIndex, HWND ImgHandle, bool Preview, bool Callback)

 

In the above function, the image will be displayed on the PictureBox by using the PictureBox handle in HWND ImgHandle.

 

Example:
DDX_Control(pDX, IDC_PIC, m_pic);
nStat=ICubeSDK_Start(g_iCurrentCam,m_pic,true,true);

 

Display an image to fit the size of the PictureBox:
Example:
DISP_PROPERTY disp_prop;
ICubeSDK_SetDisplayMode(nCamIndex,DISPLAY_FIT_TO_WINDOW, disp_prop);