You need to capture the MouseDown and MouseUp event, set a boolean, and remember the original coordinates:
bool MouseIsDragging = false;
point Start = new point();
private void MyForm_MouseDown(object sender, MouseEventArgs e)
MouseIsDragging = true;
Start.X = e.X;
Start.Y = e.Y;
private void MyForm_MouseUp(object sender, MouseEventArgs e)
MouseIsDragging = false;
if (e.Y > Start.Y) //can't remember if Y increases or decreases as you go up...
MouseHasBeenDraggedUp(); //Condition is met, do something
//If this needs to be monitored in realtime, and not just when the mouse button is up:
private void MyForm_MouseHover(object sender, MouseEventArgs e)
if (MouseIsDragging == true && e.Y > Start.Y)
MouseHasBeenDraggedUp();// Condition met
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...