title: Still cannot evaluate expression because a native frame is on top of the call stack
body: <pre><code>public partial class MainForm : Form
  {
      private IplImage frame;
      private IplImage imgMain;
      private CvCapture VideoCapture;
      private IplImage frames;
  
  
      public MainForm()
      {
          InitializeComponent();
      }
  
      private void btnVideo_Click(object sender, EventArgs e)
      {
          double vidWidth, vidHeight;
  
          if (btnVideo.Text.CompareTo("Start Video") == 0)
          {
              try
              {
                  VideoCapture = cvlib.cvCreateCameraCapture(0);
  
  
                  if (VideoCapture == null)
                  {
                      MessageBox.Show("Failed");
                      return;
                  }
  
                  btnVideo.Text = "Stop Video";
  
                  cvlib.cvSetCaptureProperty(VideoCapture, cvlib.CV_CAP_PROP_FRAME_WIDTH, 640);
                  cvlib.cvSetCaptureProperty(VideoCapture, cvlib.CV_CAP_PROP_FRAME_HEIGHT, 320);
  
                  frames = cvlib.cvQueryFrame(VideoCapture);
  
                  vidWidth = cvlib.cvGetCaptureProperty(VideoCapture, cvlib.CV_CAP_PROP_FRAME_WIDTH);
                  vidHeight = cvlib.cvGetCaptureProperty(VideoCapture, cvlib.CV_CAP_PROP_FRAME_HEIGHT);
  
                  CamImageBox.Width = (int)vidWidth;
                  CamImageBox.Height = (int)vidHeight;
  
                  timerGrab.Interval = 1000;
                  timerGrab.Enabled = true;
  
  
              }
              catch (Exception excpt)
              {
                  MessageBox.Show(excpt.Message);
              }
          }
  
          else
          {
              btnVideo.Text = "Start Video";
              timerGrab.Enabled = false;
  
              if (VideoCapture == null)
              {
                  cvlib.cvReleaseImage(frames);
                  VideoCapture = null;
              }
          }
  
  
      }
  
      private void timerGrab_Tick(object sender, EventArgs e)
      {
          frame = cvlib.cvQueryFrame(VideoCapture);
  
          if (frame == null)
          {
              timerGrab.Stop();
              MessageBox.Show("failed");
              return;
          }
  
          imgMain = cvlib.cvCreateImage(cvlib.cvSize(640, 480), 8, 3);
  
          CamImageBox.Image = cvlib.ToBitmap(imgMain, false);
  
          cvlib.cvReleaseImage(imgMain);
  
      }
  
  }
  </code></pre>
  
  <p>i changed the library that i used.</p>
  
  <p>it is now cvwrappercs230 it is a wrapper for opencv in c#..</p>
  
  <p>also it said that the cvwrappercpp230 was unable to load the dll of it. System.DLLNotfoundexception even though the dll is in the folder.</p>
  
  <p>the problem is now it is not giving me a black screen instead of it gives now a gray screen..</p>
  
  <p>and the problem when i break it is in the <code>Application.Run(new MainForm());</code></p>
  
  <p>i also changed the interval to 1000 because someone says that 42 is too low but i still dont know where the problem is..</p>
  
  <p>but when i changed the interval to 42 again.</p>
  
  <p>the problem of the  break point is back to <code>frame = cvlib.cvQueryFrame(videocapture)</code></p>