Skip to main content

AccessTr.neT


VS C# Mouse Click kodu?

jiloooo
jiloooo
3
6450

VS C# Mouse Click kodu?

#3
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);
private const int MOUSEEVENTF_LEFTDOWN = 0x02;
private const int MOUSEEVENTF_LEFTUP = 0x04;
private void Form1_Load(object sender, EventArgs e)
{

}
public static void MouseLeftClick(Point pos)
{
System.Windows.Forms.Cursor.Position = pos;
mouse_event(MOUSEEVENTF_LEFTDOWN, pos.X, pos.Y, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, pos.X, pos.Y, 0, 0);
}
private void timer1_Tick(object sender, EventArgs e)
{
MouseLeftClick(MousePosition);
}
private void button1_Click(object sender, EventArgs e)
{
timer1.Start();
}
private void button2_Click(object sender, EventArgs e)
{
timer1.Stop();
}


ne hata veriyor ne de çalışıyor Img-grin
Son Düzenleme: 26/12/2013, 01:55, Düzenleyen: jiloooo.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
VS C# Mouse Click kodu? - Yazar: jiloooo - 26/12/2013, 00:38
Cvp: VS C# Mouse Click kodu? - Yazar: mahmut18 - 26/12/2013, 00:49
Cvp: VS C# Mouse Click kodu? - Yazar: jiloooo - 26/12/2013, 01:22
Cvp: VS C# Mouse Click kodu? - Yazar: mahmut18 - 26/12/2013, 22:34