您的位置:首页 > 编程语言 > Delphi

Delphi语句用法-我原来作项目用到的语句整理

2007-04-07 15:55 363 查看
我原来作项目用到的语句整理:由于是几年前的代码了。当然有不少问题,也不清楚是干什么用的了。仅仅是看一些估计对做这个有用的句子摘抄如下:

当然写的很不规范,了解大概模仿即可。

Shape.Brush.Color:=RGB(random(255),random(255),random(255));

frmcomset:=Tfrmcomset.Create(Application);
frmcomset.showmodal();
frmcomset.Free; 

Lblcomset.Font.Color:=RGB(0,180,255);

Lblgetdata.Font.Color:=clMaroon;

 //加入帮助时使用

if Key=112 then
Application.HelpJump('mainhelp');            

StringGrid1.RowCount:=1;
StringGrid1.Cells[row,col]:='序号';
StringGrid1.Cells[row+1,col]:='时间';
StringGrid1.Cells[row+2,col]:='深度';
StringGrid1.Cells[row+3,col]:='速度';
StringGrid1.Cells[row+4,col]:='张力';
StringGrid1.Cells[row+5,col]:='报警';

inttostr(StrToInt('$'+Trim(parvalue2)));

copy(pardata,13,8);

inttostr(StrToInt('$'+Trim(speeds1)));

inttobin(strtoint(speeds1));

result:=result+(1 shl m);

resultstr:=Format('%.1x', [result]); //'x=0000C' //十六进制

inttostr(StrToInt('$'+Trim(speedresult)));

if(length(parmid4)=1)

  StringGrid1.Canvas.Font.Color:=clRed;
    StringGrid1.Cells[5,row]:='遇阻';

For chartrow:=1 to stringgrid1.rowcount-1 do
 Series1.AddXY(strtofloat(stringgrid1.cells[1,chartrow]),strtofloat(stringgrid1.cells[2,chartrow]),'',clTeeColor) ;
 For chartrow:=1 to stringgrid1.rowcount-1 do
 Series2.AddXY(strtofloat(stringgrid1.cells[1,chartrow]),strtofloat(stringgrid1.cells[4,chartrow]),'',clTeeColor) ;

floattostr(Series1.XScreenToValue(x));

StringGrid1.ColWidths[0]:=50;

var
Reg:TRegistry;
begin
Reg:=TRegistry.Create;
Reg.RootKey:=HKEY_CURRENT_CONFIG;
if Reg.OpenKey('SoftWare/Config/',true) then
begin
Reg.WriteString('DKSZ',RzCombobox1.Text);   //串口设置

Reg.CloseKey;
Reg.Free;
......

实在是太多了,算了不写了。也用不到了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  delphi random application c