Código Delphi [-] procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin IF Trim(Edit1.Text)=''THEN BEGIN IF(Key=#69)OR(Key=#86)THEN //E=69 - V=86 .. Utiliza la propiedad "CharCase" en ecUpperCase Exit ELSE Key:=#0; END ELSE BEGIN IF Key = #8 THEN Exit; // Tecla IF (Key<#48)OR(Key > #58) THEN Key:=#0; END; end;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin IF Trim(Edit1.Text)=''THEN BEGIN IF(Key=#69)OR(Key=#86)THEN //E=69 - V=86 .. Utiliza la propiedad "CharCase" en ecUpperCase Exit ELSE Key:=#0; END ELSE BEGIN IF Key = #8 THEN Exit; // Tecla IF (Key<#48)OR(Key > #58) THEN Key:=#0; END; end;