?? comset.~pas
字號(hào):
unit comset;
interface
uses
Windows, Messages,SPComm, Controls, Classes, SysUtils, Variants, Graphics, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
ComboBox1: TComboBox;
Label3: TLabel;
Edit2: TEdit;
Label4: TLabel;
ComboBox2: TComboBox;
Label5: TLabel;
ComboBox3: TComboBox;
Button1: TButton;
Button2: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
parity1:TParity ;
StopBits1: TStopBits;
ByteSize1: TByteSize;
implementation
uses fcomm;
{$R *.dfm}
procedure TForm2.Button2Click(Sender: TObject);
begin
form2.Close;
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
with form1.Comm1
do
begin
commname:=edit1.Text;
baudrate:=strtoint( edit2.Text ) ;
parity:=tparity(ComboBox1.itemindex) ;
StopBits:=tStopBits( ComboBox3.ItemIndex ) ;
bytesize:=tbytesize( ComboBox2.ItemIndex ) ;
form2.Close;
end;
// with
end;
end.
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -