Coloque o código no envento onKeyPress de um Edit.
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);begin
with Sender as TEdit do
if (SelStart = 0) or (Text[SelStart] = ‘ ‘) then
if Key in [‘a’..’z’] then Key := UpCase(Key);end;
with Sender as TEdit do
if (SelStart = 0) or (Text[SelStart] = ‘ ‘) then
if Key in [‘a’..’z’] then Key := UpCase(Key);end;
Nenhum comentário:
Postar um comentário