title: Change the position of auto scroll bar in a panel in C++
body: <p>I would like to write an application in C++ that can pan image when user hold and move the mouse. I used a Panel and put a pictureBox on it. The property AutoScroll of the Panel is set to true. Now I am trying to change the position of the scroll bar when the mouse move. I tried a few methods but it does not work.</p>
  
  <p>For simplicity, I use +/-100, +/-100 for codes here. I tried</p>
  
  <pre><code>Point p = new Point(100, 100);
  panel1-&gt;AutoScrollPosition = p;
  </code></pre>
  
  <p>It gives me the following error:</p>
  
  <blockquote>
    <p>cannot convert from 'System::Drawing::Point *' to 'System::Drawing::Point'"</p>
  </blockquote>
  
  <p>I also tried the following.</p>
  
  <pre><code>panel1-&gt;AutoScrollPosition.X = 100;
  panel1-&gt;AutoScrollPosition.Y = 100;
  </code></pre>
  
  <p>However, the scrollbar does not move and always return 0,0.
  I have tried using both -ve and +ve values but it's just not working.</p>
  
  <p>How can I solve this problem?</p>