Sayfayı Yazdır | Pencereyi Kapat

Mouse Event atama

Nereden Yazdırıldığı: Clomosy | Forum
Kategori: Genel Programlama
Forum Adı: Clomosy ile değişken kullanımı
Forum Tanımlaması: TRObject dili ile değişken tanımlaması ve ekranda gösterme
URL: https://forum.clomosy.com.tr/forum_posts.asp?TID=1313
Tarih: 12 Şubat 2026 Saat 17:31
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: Mouse Event atama
Mesajı Yazan: sumeyyesoy
Konu: Mouse Event atama
Mesaj Tarihi: 12 Şubat 2026 Saat 13:59
Nasıl mouse event ataması yapabilirim? Peki bu eventler mobil cihazda nasıl görünür/çalışır? https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">



Cevaplar:
Mesajı Yazan: kaanl0
Mesaj Tarihi: 12 Şubat 2026 Saat 16:34
Merhaba nasıl bir işlem yapmak istiyorsun. MouseEvent işlemlerinin olduğu dokumantasyon dosyasını paylaşıyorum 
https://www.docs.clomosy.com/Mouse_Movements" rel="nofollow - https://www.docs.clomosy.com/Mouse_Movements https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">


Mesajı Yazan: kaanl0
Mesaj Tarihi: 12 Şubat 2026 Saat 16:51
Mouse eventleri mobil cihazdada genellikle çalışır. Telefon ekranına tıkladığında, bıraktığında vb. Aşağıda bir kod bırakıyorum istersen hem mobil hem Bilgisayarda dene 

var
  MainForm : TclForm;
  TestPanel : TclProPanel;
  InfoLbl : TClProLabel;

// 1. BASILINCA (MouseDown)
void onMyMouseDown;
{
  TestPanel.clProSettings.BackgroundColor = clAlphaColor.clRed; // Kırmızı yap
  TestPanel.SetclProSettings(TestPanel.clProSettings);
  InfoLbl.Text = 'Durum: BASILIYOR';
}

// 2. BIRAKILINCA (MouseUp)
void onMyMouseUp;
{
  TestPanel.clProSettings.BackgroundColor = clAlphaColor.clBlue; // Mavi yap
  TestPanel.SetclProSettings(TestPanel.clProSettings);
  InfoLbl.Text = 'Durum: BIRAKILDI';
}

// 3. HAREKET EDİNCE (MouseMove) ve KOORDİNATLAR
void onMyMouseMove;
{
  // Nesneye (Sender) göre koordinatları alıp ekrana yazıyoruz
  InfoLbl.Text = 'X: ' + IntToStr(MainForm.clSenderMousePosX) + 
                 ' - Y: ' + IntToStr(MainForm.clSenderMousePosY);
}

{
  MainForm = TclForm.Create(Self);
  
  // Bilgi Etiketi
  InfoLbl = MainForm.AddNewProLabel(MainForm, 'InfoLbl', 'Fareyi panelin üzerine getir...');
  InfoLbl.Align = alTop;
  InfoLbl.Height = 50;
  InfoLbl.clProSettings.FontSize = 20;
  InfoLbl.SetclProSettings(InfoLbl.clProSettings);

  // Test Paneli
  TestPanel = MainForm.AddNewProPanel(MainForm, 'TestPanel');
  TestPanel.Align = alCenter;
  TestPanel.Width = 250;
  TestPanel.Height = 250;
  TestPanel.clProSettings.BackgroundColor = clAlphaColor.clBlue;
  TestPanel.SetclProSettings(TestPanel.clProSettings);
  
  // --- SENİN YOLLADIĞIN DOĞRU EVENTLER ---
  MainForm.AddNewEvent(TestPanel, tbeOnMouseDown, 'onMyMouseDown');
  MainForm.AddNewEvent(TestPanel, tbeOnMouseUp, 'onMyMouseUp');
  MainForm.AddNewEvent(TestPanel, tbeOnMouseMove, 'onMyMouseMove');
  
  MainForm.Run;
}


Mesajı Yazan: sumeyyesoy
Mesaj Tarihi: 12 Şubat 2026 Saat 17:09
Çok faydalı oldu teşekkür ederim. https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">



Sayfayı Yazdır | Pencereyi Kapat

Forum Software by Web Wiz Forums® version 12.07 - https://www.webwizforums.com
Copyright ©2001-2024 Web Wiz Ltd. - https://www.webwiz.net