CameraImage.Form1.Form1_Load C# (CSharp) Méthode

Form1_Load() private méthode

private Form1_Load ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void
        private void Form1_Load( object sender, EventArgs e )
        {
            try {
                // 初期化
                xnInitialize();

                // カメラサイズのイメージを作成(8bitのRGB) ... (3)
                bitmap = new Bitmap( runtime.VideoStream.Width, runtime.VideoStream.Height,
                            System.Drawing.Imaging.PixelFormat.Format32bppRgb );

                // ウィンドウサイズをカメラサイズに合わせる
                ClientSize = new Size( runtime.VideoStream.Width, runtime.VideoStream.Height );

                // 画像更新のためのスレッドを作成
                shouldRun = true;
                readerThread = new Thread( ReaderThread );
                readerThread.Start();
            }
            catch ( Exception ex ) {
                MessageBox.Show( ex.Message );
                Close();
            }
        }