Tengo este procedimiento:
procedure TForm1.BitBtn1Click(Sender: TObject); var Valor: integer; Str: string; begin Valor := StrToInt(Edit1.Text) ; if Valor in [0..255] then Str := Chr(Valor); ComPort.WriteStr(Str); end;
La cosa es que si no entro en el edit un integer me dara un bug y quiero eliminar esa posibilidad.Deve ser algo asi como un Else Showmessage (bla bla) pero debo poner algo mas?
Un Saludo.