D
duanmu012345
Unregistered / Unconfirmed
GUEST, unregistred user!
下面是我给的控件初始化的一段程序, 执行的时候老提示 无效属性
我都不知道该怎么办了,有谁知道啊,知道的给分,谢谢
procedure TMSCSetup.MSCSetClick(Sender: TObject);
var
B1:string;
B2:string;
begin
B1:='';
MainFM.MSComm1.PortOpen:=false;
if RadioButton1.Checked then
MainFM.MSComm1.CommPort:=1;
if RadioButton2.Checked then
MainFM.MSComm1.CommPort:=2;
if RadioButton3.Checked then
MainFM.MSComm1.CommPort:=3;
if RadioButton4.Checked then
MainFM.MSComm1.CommPort:=4;
if RadioButton5.Checked then
MainFM.MSComm1.CommPort:=5;
if RadioButton6.Checked then
MainFM.MSComm1.CommPort:=6;
if RadioButton7.Checked then
MainFM.MSComm1.CommPort:=7;
if RadioButton8.Checked then
MainFM.MSComm1.CommPort:=8;
if RadioButton9.Checked then
MainFM.MSComm1.CommPort:=9;
if RadioButton10.Checked then
MainFM.MSComm1.CommPort:=10;
if RadioButton11.Checked then
MainFM.MSComm1.Handshaking:=0;
if RadioButton12.Checked then
MainFM.MSComm1.Handshaking:=1;
if RadioButton13.Checked then
MainFM.MSComm1.Handshaking:=2;
if RadioButton14.Checked then
MainFM.MSComm1.Handshaking:=3;
B1:=ComboBox1.Text+','+ComboBox2.Text+','+ComboBox3.Text+','+ComboBox4.Text;
MainFM.MSComm1.Settings:=B1;
MainFm.MSComm1.PortOpen:=true;
close;
end;
我都不知道该怎么办了,有谁知道啊,知道的给分,谢谢
procedure TMSCSetup.MSCSetClick(Sender: TObject);
var
B1:string;
B2:string;
begin
B1:='';
MainFM.MSComm1.PortOpen:=false;
if RadioButton1.Checked then
MainFM.MSComm1.CommPort:=1;
if RadioButton2.Checked then
MainFM.MSComm1.CommPort:=2;
if RadioButton3.Checked then
MainFM.MSComm1.CommPort:=3;
if RadioButton4.Checked then
MainFM.MSComm1.CommPort:=4;
if RadioButton5.Checked then
MainFM.MSComm1.CommPort:=5;
if RadioButton6.Checked then
MainFM.MSComm1.CommPort:=6;
if RadioButton7.Checked then
MainFM.MSComm1.CommPort:=7;
if RadioButton8.Checked then
MainFM.MSComm1.CommPort:=8;
if RadioButton9.Checked then
MainFM.MSComm1.CommPort:=9;
if RadioButton10.Checked then
MainFM.MSComm1.CommPort:=10;
if RadioButton11.Checked then
MainFM.MSComm1.Handshaking:=0;
if RadioButton12.Checked then
MainFM.MSComm1.Handshaking:=1;
if RadioButton13.Checked then
MainFM.MSComm1.Handshaking:=2;
if RadioButton14.Checked then
MainFM.MSComm1.Handshaking:=3;
B1:=ComboBox1.Text+','+ComboBox2.Text+','+ComboBox3.Text+','+ComboBox4.Text;
MainFM.MSComm1.Settings:=B1;
MainFm.MSComm1.PortOpen:=true;
close;
end;