Skip to content

Instantly share code, notes, and snippets.

@immengineer
Created August 2, 2017 00:54
Show Gist options
  • Save immengineer/1cd45c343658a69280fa7c3b1b00d903 to your computer and use it in GitHub Desktop.
Save immengineer/1cd45c343658a69280fa7c3b1b00d903 to your computer and use it in GitHub Desktop.
JAISDK ChildWindow Resize
private void Form1_Resize(object sender, EventArgs e)
{
// Here we need to resize the Child Window image display
if (myCamera != null)
{
Jai_FactoryWrapper.RECT newRectSize;
if (myCamera.StretchLiveVideo)
newRectSize = new Jai_FactoryWrapper.RECT(0, 0, pictureBox1.Width, pictureBox1.Height);
else
newRectSize = new Jai_FactoryWrapper.RECT(0, 0, Convert.ToInt32(myCamera.GetNode("Width").Max), Convert.ToInt32(myCamera.GetNode("Height").Max));
Jai_FactoryWrapper.J_Image_ResizeChildWindow(myCamera.WindowHandle, ref newRectSize);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment