• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
纯粹备忘
博客园    首页    新随笔    联系   管理    订阅  订阅
2011年7月20日
delphi键盘按钮参数
摘要: 分别在FormCreate,FormKeyPress下编写一句代码就可以了如下:procedure TForm1.FormCreate(Sender: TObject);beginkeypreview:=true; //可以接收键盘操作end;procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);beginif key = #27 then application.terminate; //关闭程序end;#13 回车#10换行#20为空格键盘常用ASCII码(delphi)键盘常用ASCII码(delphi) ESC键 V 阅读全文
posted @ 2011-07-20 16:34 纯粹备忘 阅读(4244) 评论(0) 推荐(0)
delphi for循环
摘要: for i:=0 to 100 step 4 do begin ... end; 阅读全文
posted @ 2011-07-20 11:43 纯粹备忘 阅读(3404) 评论(1) 推荐(0)
delphi建立mdi窗口 多页面管理
摘要: Form1中加Panel1,Panel1的属性DockSite设为True,Form2的属性DragKind设为dkDock, DragMode设为dmAuromatic在Form1的OnShow中加:Form2:= TForm2.Create(self);Form2.ManualDock(Panel1, nil, alclient);form2.FormStyle:=fsStayOnTop;Form2.Show;如果是pagecontrolForm2.ManualDock(pagecontrol1, nil, alclient); 阅读全文
posted @ 2011-07-20 11:34 纯粹备忘 阅读(2677) 评论(0) 推荐(0)
AdvPageControl或者pagecontrol 动态建立新页面
摘要: var tab1:TadvTabSheet;begin tab1:=TadvTabSheet.Create(self); tab1.Caption:='供应商资料'; tab1.AdvPageControl:=ap1;pagecontroltab1:=TTabSheet.Create(self); tab1.Caption:=timetostr(time); tab1.PageControl :=PageControl1 阅读全文
posted @ 2011-07-20 11:22 纯粹备忘 阅读(723) 评论(0) 推荐(0)
左键双击关闭pagecontrol中的一个分页即一个tabsheet,功能像遨游浏览器一样
摘要: 左键双击关闭pagecontrol中的一个分页即一个tabsheet,功能像遨游浏览器一样procedure TfrmServerSetup.PageControl1MouseDown(Sender: TObject;Button: TMouseButton; Shift: TShiftState; X, Y: Integer);varIndex: Integer;begin//左键点击并且双击if (Button = mbLeft) and (ssDouble in Shift) thenbeginIndex := PageControl1.IndexOfTabAt(X, Y);if Ind 阅读全文
posted @ 2011-07-20 11:11 纯粹备忘 阅读(698) 评论(0) 推荐(0)
2011年7月19日
DBGridEh合计
摘要: dbgrideh1.footerrowcount:=1;dbgrideh1.sumlist.active:=true;每一列pDbGrid.Columns[0].Footer.ValueType:=fvtStaticText; pDbGrid.Columns[0].Footer.Value:='记录数'; pDbGrid.Columns[1].Footer.ValueType:=fvtCount;dbgrideh,displayformat #,###0.00 阅读全文
posted @ 2011-07-19 22:49 纯粹备忘 阅读(2868) 评论(0) 推荐(0)
dbadvgrid合计和添加序列号
摘要: gslb1.AutoNumberCol(0); //第0列设置为序号列gslb1.FloatingFooter.ColumnCalc[0] := acCount; //第一列统计为计数gslb1.FloatingFooter.ColumnCalc[7] := acSum; //第二列统计为求和gslb1.FloatingFooter.ColumnCalc[8] := acSum; //第二列统计为求和 阅读全文
posted @ 2011-07-19 22:27 纯粹备忘 阅读(649) 评论(0) 推荐(0)
DBGridEh添加序号列
摘要: //聲明全局變量i procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin with DBGrid1.DataSource.DataSet do begin if DataCol = 0 then //設置在第一列 begin if state<>dsInsert then i:= recno; //這句是關鍵。。。 DBGrid1.Canvas.TextRec 阅读全文
posted @ 2011-07-19 15:36 纯粹备忘 阅读(2736) 评论(1) 推荐(0)
2011年7月12日
Delphi 日期格式固定
摘要: Delphi 日期格式问题我用strtodate('2001-12-30') 出现'is not a valid date '错误我查看 控制面板->区域设置->日期发现日期 分隔符号用了 '/' 如果改为'-'就没有问题解决办法:在主程序的OnCreate事件中加入: DateSeparator := '-'; ShortDateFormat := 'yyyy-mm-dd'; LongDateFormat := 'yyyy-mm-dd'; 阅读全文
posted @ 2011-07-12 07:16 纯粹备忘 阅读(607) 评论(0) 推荐(0)
2011年4月12日
RESIN tmp work目录设置
摘要: 如果不设置work-dir的话,resin默认是在WEB-INF下建立一个work目录.如果不设置temp-dir的话,resin默认是在WEB-INF下建立一个tmp目录这些都是resin的默认行为,如果想修改,在配置文件中添加work-dir和temp-dir参数设置就行了详细情况可以参考下面的配置:Java代码<hostid="domain.name"><host-alias>domain.name</host-alias><root-directory>domain.name/htdocs</root-direc 阅读全文
posted @ 2011-04-12 01:19 纯粹备忘 阅读(1955) 评论(0) 推荐(0)
下一页
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3