Wednesday, August 15, 2012

Check if mouse coordinate is outside the form coordinates in mouseup event

Code:
  private void dgvScriptsTime_MouseUp(object sender, MouseEventArgs e)  
  {  
    if(!this.ClientRectangle.Contains(e.Location))  
    {  
       FShowGrid showGrid = new FShowGrid("Test", dgvScriptsTime);  
       showGrid.ShowDialog();  
    }  
  }

0 comments:

Post a Comment