Jump to content

Picturebox Key Event


korasoglu
 Share

Recommended Posts

 
         Ams bölümü çok hızlıydı aktifti ve her zaman bana çok büyük zevk verdi uzman olmadık ama kendi işimizi görür olduk. Kintaro el atıpta şahlanmazsa çok üzülürüm. Benim için o bir efsanedir hep öyle kalacak Sevgili Ali değerli bir arkadaşamız ne olur bu bölümü birlik ayağa kaldıralım.
 

       Forumun bu bölümünde hereket azaldı soru soruluyor cevap veren yok burada amaç birileri öğrenecek birileri öğrenecek. Elbetteki kimse buna yapmaya mecbur değil. ama bilgi paylaşılırsa daha anlamlı olur. Bakın bu bölüm açıldı yerinde isabetli bir karardı fakat hareket olmayınca atıl durumda gibi gözüküyor. Daha açılan konu ve örnek çalışmalar deve de kulak el ele daha zengin hale getirelim. Konu açılıp cevap alamayınca tekrar açıp cevap beklemenin veya girmenin bir anlamı olmuyor.


TextBoxun eventine şu şekilde ulaşablirsiniz.

void asd(KeyPressEventArgs e)
        {
            char ch = e.KeyChar.ToString().ToUpper()[0];
 
            string[] tr = { "Ş", "Ğ", "Ç", "İ", "Ö", "Ü" };
            string[] en = { "S", "G", "C", "I", "O", "U" };
 
            bool kontrol = false;
            int i = 0;
            foreach (string harf in tr)
            {
                if (ch.ToString() == harf)
                {
                    e.KeyChar = Convert.ToChar(en[i]);
                    kontrol = true;
                    break;
                }
                i++;
            }
 
            if (!kontrol)
            {
                e.KeyChar = e.KeyChar.ToString().ToUpper()[0];
            }
 
            if (e.KeyChar == 13)
            {
                
            }
        }
 
Çağırırken
 
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
        {
            asd(e);
        }
Pictureboxu daha denmedim çözünce yazarım.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...