Beispiel #1
0
        private void CaptureBttn_Click(object sender, EventArgs e)
        {
            snagVideo.Output = snagVideoOutput.svoFile;
            snagVideo.OutputVideoFile.FileNamingMethod = snagOuputFileNamingMethod.sofnmPrompt;

            // Show Preview Window?
            snagVideo.EnablePreviewWindow = PreviewChkBx.Checked;

            // Include the cursor in the capture?
            snagVideo.IncludeCursor = CursorChkBx.Checked;

            // Show the magnifier when selecting
            snagVideo.UseMagnifierWindow = MagnifierChkBx.Checked && CaptureType.Text != "Window";

            // Try to initiate the capture, catch any errors and display an
            // appropriate error message.  Here, SnagIt expiration error is shown
            // as an example. See the Snagit COM documentation for the rest of the
            // error types in the snagError enum.
            try
            {
                snagVideo.Capture(); //Starts the Snagit selection UI and then displays the recording UI
            }
            catch
            {
                txtBoxErrors.Text = snagVideo.LastError.ToString();
            }
        }