hi,
i have to make an application in C#..that is form and there is an eye on it..while i moving the mouse cursor eye will watch it..but eye will not move with mouse cursor..it is only watching it simultaneously ...
how can i do that.. i try it again and again but i couldn't do.. i asked that my friends..they say i should use mousemove event...and timer...but i couldn't..
please help...
Loading
holestaryPosted Apr 18, 2009, 2:07 PM
holestaryPosted Apr 17, 2009, 12:10 PM
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace son
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
{
int x = e.X;
int y = e.Y;
groupBox1.Location = new Point(x, y);
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
there is a picturebox on the groupbox..and while i moving the mouse it move with it...but i want it only watch mouse...
Mahesh ChandPosted Apr 17, 2009, 10:26 AM
This article explains the usage of key and mouse events. The following code shows you how you can read mouse position on mouse move.
This article tells you how to create a help window which appears when your mouse moves on a particular web page area.
This article explains how to handle mouse events in C# or VB. In C#, you write a delegate and then write an event handler.
It is a custom control that allows you to use your mouse as a joystick.
This article shows you how to write control, mouse, and keyboard event handlers in C#.