beyler amacım c# form üzerinde olan butona tıklangından mouse un 10 kere ard arda click yapmasını saglamak. kodu bulamadım bitürlü yardımlarınızı bekliyorum
DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.
Üye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.
kodu aradım taradım buldum belki işinize yarar paylaşıyorum burdan using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices;
namespace WindowsFormsApplication2 { public partial class Form1 : Form
{ [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;
public Form1() { DoMouseClick(); } public void DoMouseClick() { for (int i = 0; i < 200; i++) { System.Threading.Thread.Sleep(100); //Call the imported function with the cursor's current position int X = Cursor.Position.X; int Y = Cursor.Position.Y; mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, X, Y, 0, 0); }
kodu aradım taradım buldum belki işinize yarar paylaşıyorum burdan using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices;
namespace WindowsFormsApplication2 { public partial class Form1 : Form
{ [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;
public Form1() { DoMouseClick(); } public void DoMouseClick() { for (int i = 0; i < 200; i++) { System.Threading.Thread.Sleep(100); //Call the imported function with the cursor's current position int X = Cursor.Position.X; int Y = Cursor.Position.Y; mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, X, Y, 0, 0); }
kodu bulamadım bitürlü yardımlarınızı bekliyorum
DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.
Üye Ol Şimdi DeğilÜye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.