How to display the image on the PictureBox instead of another tab (using the attached SDK)

How to display the image on the PictureBox instead of another tab (using the attached SDK)?

 

If you use the sample program of SDK, the image will be shown in a separate window.

 

If you want to display in PictureBox inside Form,

Please refer to API manual page.

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

With the function above, an image is displayed on the PictureBox by using the handle of PictureBox for HWND ImgHandle.

 

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

Display the image according to the size of PictureBox:

Example:
DISP_PROPERTY disp_prop;
ICubeSDK_SetDisplayMode(nCamIndex,DISPLAY_FIT_TO_WINDOW, disp_prop);

PHƯƠNG PHÁP HIỂN THỊ HÌNH ẢNH TRONG PICTUREBOX CHỨ KHÔNG PHẢI TRONG CỬA SỔ RIÊNG BIỆT (KHI DÙNG SDK KÈM THEO)

Phương pháp hiển thị hình ảnh trong PictureBox chứ không phải trong cửa sổ riêng biệt (khi dùng SDK đính kèm theo)

 

Nếu cứ dùng chương trình mẫu của SDK thì có thể hiển thị hình ảnh trong cửa sổ riêng biêt.

Khi muốn hiển thị ở PictureBox trên Form,
vui lòng tham khảo trang có đề cập đến hướng dẫn sử dụng API phía dưới đậy. 
int iCube SDK_Start (int nCamIndex, HWND ImgHandle, bool Preview, bool Callback)

Với những hàm ở trên , bằng các dùng Handle của PictureBox trên HWND ImgHandle thì hình ảnh sẽ được hiển thị trên PictureBox.

Ví dụ:
DDX_Control(pDX, IDC_PIC, m_pic);
nStat=ICubeSDK_Start(g_iCurrentCam,m_pic,true,true);

Hiển thị hình ảnh dựa theo kích thước của PictureBox

Ví dụ:
DISP_PROPERTY disp_prop;
ICubeSDK_SetDisplayMode(nCamIndex,DISPLAY_FIT_TO_WINDOW, disp_prop);

映像を別ウインドでなく、PictureBoxに表示させる方法 (付属SDK御利用時)

映像を別ウインドでなく、PictureBoxに表示させる方法 (付属SDK御利用時)

SDKのサンプルプログラムをそのまま使うと別ウインドに映像が映ります。

Form内のPictureBox内に表示させたい場合、
APIマニュアルの下記が掲載されているページをご参照ください。 
int iCube SDK_Start (int nCamIndex, HWND ImgHandle, bool Preview, bool Callback)

上記関数にて、HWND ImgHandleに、PictureBoxのハンドルを使用することでPictureBox上に画像が表示されます。

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

PictureBoxの大きさに合わせて画像を表示する:
例:
DISP_PROPERTY disp_prop;
ICubeSDK_SetDisplayMode(nCamIndex,DISPLAY_FIT_TO_WINDOW, disp_prop);