Sets charachter transmission speed. type TBaudRate = (brCustom, br110, br300, br600, br1200, br2400, br4800, br9600,br14400, br19200, br38400, br56000, br57600, br115200); property BaudRate: TBaudRate; Description BaudRate property represents the speed at which charchters are sent or received via RS232 conection. Both sides of connection should have the same BaudRate. If BaudRate has a value of brCustom, CustomBaudRate property is used to set baud rate. Sets custom charachter transmission speed. property CustomBaudRate: Integer; Description Use CustomBaudRate property to set custom baud rate for charachter transmission. Ff BaudRate property is not set to brCustom, CustomBaudRate property has no effect.在他的帮助文件抄来的,各位大哥帮我看一下。
type TBaudRate = (brCustom, br110, br300, br600, br1200, br2400, br4800, br9600,br14400, br19200, br38400, br56000, br57600, br115200);
property BaudRate: TBaudRate;
Description
BaudRate property represents the speed at which charchters are sent or received via RS232 conection. Both sides of connection should have the same BaudRate. If BaudRate has a value of brCustom, CustomBaudRate property is used to set baud rate.
Sets custom charachter transmission speed.
property CustomBaudRate: Integer;
Description
Use CustomBaudRate property to set custom baud rate for charachter transmission. Ff BaudRate property is not set to brCustom, CustomBaudRate property has no effect.在他的帮助文件抄来的,各位大哥帮我看一下。
这样就可以设了:
ComPort1.Baud:=strtoint(edit1.Text);
comport1.baudrate:=TBaudRate;
例如comport1.baudrate:=br115200;
而不能是integer;