title: flag value will be reset on usercontrol paint event
body: <p>Created Winusercontrol consist of 1 form and 1 panel.
  Draw some text on paint event of panel of user control.
  Add reference of usercontrol in my application.</p>
  
  <p>usercontrol code:</p>
  
  <pre><code>bool flag=false;
  public void Somthing()
  {
    ///some code...
    ///
    flag=true;
  }
  
  protected void panel_paint(PainteventArgs e)
  {
   if(flag==true)
     //draw some text
  }
  </code></pre>
  
  <p>Form Application code:</p>
  
  <pre><code>private void frmMain_Load(object sender, EventArgs e)   
  {
     usercontrol obj=new usercontrol();
     obj.Somthing();
  }
  </code></pre>
  
  <p>when i created object of library and call Somthing().
  when check in paint event flag value will be false.
  so no text will be drawn 
  i dont know why flag value will be reset. </p>