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;
......
实在是太多了,算了不写了。也用不到了。
当然写的很不规范,了解大概模仿即可。
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;
......
实在是太多了,算了不写了。也用不到了。
相关文章推荐
- 最近做一个新闻类项目,用到调用新浪微博接口,经过研究测试整理步骤如下:先根据此内容获取App Key和Secret Key
- delphi try except语句 和 try finally语句用法以及区别
- 项目中使用easyui框架,常见的用法(慢慢整理)
- 一个项目用到的sql语句
- Delphi异常处理try except语句和try finally语句用法以及区别〖原创+转载〗
- ui-route的一般用法 ,比较简单。在平时项目也用到,但是我也要记下来,虽然是'借鉴的',取其精华
- 一个项目涉及到的50个Sql语句(整理版)
- 【转发】SQL语句用法整理
- 整理一些最近项目中用到的一些JS方法
- 一个项目涉及到的50个Sql语句(整理版)
- 一个项目涉及到的50个Sql语句(整理版)
- css考核点整理(十二)-能描述下你在项目中都用到了哪些符合逐渐增强和优雅降级的理念的技巧吗
- 一个项目涉及到的50个Sql语句(整理版)
- Delphi 的编译指令(2): 条件语句的更多用法
- 一个项目涉及到的50个Sql语句(整理版)
- delphi try except语句 和 try finally语句用法以及区别
- delphi try except语句 和 try finally语句用法
- Delphi异常处理try except语句和try finally语句用法以及区别
- Delphi异常处理try except语句和try finally语句用法以及区别
- 项目中用到的Android代码整理