imleçi haraket ettirmek

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
maqro
Üye
Mesajlar: 132
Kayıt: 11 Eki 2005 10:59

imleçi haraket ettirmek

Mesaj gönderen maqro »

s.a

Mouse imkeçini istediğimiz koordinatlara nasıl taşıyabiliriz?
Kullanıcı avatarı
sadettinpolat
Moderator
Mesajlar: 2131
Kayıt: 07 Ara 2003 02:51
Konum: Ankara
İletişim:

Mesaj gönderen sadettinpolat »

:ara , mouse move , Bütün terimler için ara
"Sevmek, ne zaman vazgececegini bilmektir." dedi, bana.

---
http://sadettinpolat.blogspot.com/
Kullanıcı avatarı
pasa_yasar
Üye
Mesajlar: 570
Kayıt: 07 Haz 2004 12:35

Mesaj gönderen pasa_yasar »

Kod: Tümünü seç

//simulating mouse click
//we need 2 buttons on the form
procedure TForm1.Button1Click(Sender: TObject) ;
var
   Pt : TPoint;
begin
   Application.ProcessMessages;
   {Get the point in the center of Button 2}
   Pt.x := Button2.Left + (Button2.Width div 2) ;
   Pt.y := Button2.Top + (Button2.Height div 2) ;
  {Convert Pt to screen coordinates and Mickeys}
   Pt := ClientToScreen(Pt) ;
   Pt.x := Round(Pt.x * (65535 / Screen.Width)) ;
   Pt.y := Round(Pt.y * (65535 / Screen.Height)) ;
  {Simulate the mouse move}
   Mouse_Event(MOUSEEVENTF_ABSOLUTE or
               MOUSEEVENTF_MOVE,
               Pt.x, Pt.y, 0, 0) ;
  {Simulate the left mouse button down}
   Mouse_Event(MOUSEEVENTF_ABSOLUTE or
               MOUSEEVENTF_LEFTDOWN,
               Pt.x, Pt.y, 0, 0) ;;
  {Simulate the left mouse button up}
   Mouse_Event(MOUSEEVENTF_ABSOLUTE or
               MOUSEEVENTF_LEFTUP,
               Pt.x, Pt.y, 0, 0) ;;
end;
asıl işi

Kod: Tümünü seç

Mouse_Event(MOUSEEVENTF_ABSOLUTE or
               MOUSEEVENTF_MOVE,
               Pt.x, Pt.y, 0, 0) ;
kodu yapıyor. daha önce birkaç uygulamada kullandım
mcihad
Üye
Mesajlar: 283
Kayıt: 18 Tem 2003 03:28
Konum: Sivas

Mesaj gönderen mcihad »

SetCursorPos()
Bize iyilik yaraşır.
Cevapla