المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : how to detect mouse over the picturebox?



C# Programming
03-08-2010, 02:51 PM
it is very easy to detect if someone work with mouse move event of picturebox. but i want to detect mouse over picturebox in mouse move event of the form so first i did set the keypreview property of form to true and then i wrote the code in mouse move event of form.

so my code is ---

private void Form1_MouseMove(object sender, MouseEventArgs e)
{
int X=e.X;
int Y=e.Y;

if ((X >= pic.Left && X = pic.Top && Y