Delphi Dünyası Facebook'ta

Kodbank İndir

! CODEBANK 2012 !

İNDİRMEK&DETAYLI BİLGİ ALMAK İÇİN BURAYI TIKLAYINIZ.

Gönderen Konu: KeyPress Anında Formatlı Yazı  (Okunma sayısı 2187 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı Fatih

  • Emekli Yönetici
  • *****
  • İleti: 2.217
  • Rep: +43/-10
  • Cinsiyet: Bay
    • Delphi Dünyası
KeyPress Anında Formatlı Yazı
« : 08 Ekim 2005 00:38:14 »
Kod: [Seç]
procedure TForm3.Edit1KeyPress(Sender: TObject; var Key: Char);
var
strng:string;
begin
strng:=Edit1.text;

if (Edit1.SelStart = 0) or
(Edit1.SelTEXT = ' ') then

     Case Key of
               'ı': Key := 'I';
               'i': Key := 'İ';
               else Key := AnsiUpperCase(Key)[1];
               end
               else
 if (strng[Length(Edit1.Text)]=' ') or (strng[Length(Edit1.Text)]='.') then
      Case Key of
               'ı': Key := 'I';
               'i': Key := 'İ';
               else Key := AnsiUpperCase(Key)[1];
               end
               else
 if NOT  (strng[Length(Edit1.Text)]=' ') or NOT (strng[Length(Edit1.Text)]='.')  then
      Case Key of
               'I': Key := 'ı';
               'İ': Key := 'i';
               else Key := AnsilowerCase(Key)[1];
               end;
end;  
Malulen emekli programcı / yazar. Bildiklerini unutmakta olduğundan size cevap veremez.