摘要: uses ShellAPI,Registry;var reg: TRegistry; s: String;begin reg := TRegistry.Create; reg.RootKey := HKEY_CLASSES_ROOT; reg.OpenKey('HTTP\Shell\open\command',False); s := reg.ReadString('');//读取注册表的值 如:"D:\Program Files\Maxthon3\Bin\Maxthon.exe" "%1" s := Copy(s,Pos 阅读全文
posted @ 2012-07-19 15:18 ftwsnow 阅读(1087) 评论(0) 推荐(0) 编辑
摘要: procedure TForm1.FormShow(Sender: TObject);begin ADOTable1.Open;end;procedure TForm1.DBCtrlGrid1PaintPanel(DBCtrlGrid: TDBCtrlGrid; Index: Integer);var Status:string; Tname:string; TCap:string; textrect,CapRect,panelRect:TRect;begin with DBCtrlGrid do begin //取数据 with datasource.DataSe... 阅读全文
posted @ 2012-06-25 17:06 ftwsnow 阅读(1145) 评论(0) 推荐(0) 编辑
摘要: procedure SysMenuCommand(var Msg:TWMMENUSELECT);message WM_SYSCOMMAND;procedure TFormMain.SysMenuCommand(var Msg: TWMMenuSelect);begin case Msg.IDItem of 0: begin MessageBox(0,PChar('茶杯'),'操作提示',MB_OK+MB_ICONINFORMATION); end; 1: begin MessageBox(0,PChar('书本'),'操作提示', 阅读全文
posted @ 2012-06-21 09:12 ftwsnow 阅读(300) 评论(0) 推荐(0) 编辑
摘要: BorderColor:TColor; //边框颜色 FillColor:TColor; //未选中填充颜色 TextColor:TColor; //未选中字体颜色 SelectTextColor:TColor; //选中字体颜色 SelectFillColor:TColor; //选中填充颜色 SideBuffer:Integer; //边框宽度procedure TForm1.FormCreate(Sender: TObject);begin BorderColor:=clRed; FillColor:=clWhite; TextColor:=clBlue;... 阅读全文
posted @ 2012-06-21 09:10 ftwsnow 阅读(819) 评论(0) 推荐(0) 编辑
摘要: 一个容器控件如果被其他控件指定为属主(Owner), 那么它的 Components 集合就会增加一个元素;一个容器控件如果被其他控件指定为 Parent, 那么它的 Controls 集合就会增加一个元素;控件释放时空同时释放 Components 集合中的元素;控件 Controls 集合中的控件都会显示在它的怀抱中, 并且 Left、Top 等属性也都是参照它. 阅读全文
posted @ 2012-06-08 14:09 ftwsnow 阅读(168) 评论(0) 推荐(0) 编辑
摘要: BtnClearFormula.Caption:= ' 修'#13'改'#13'风'#13'格'#13''#13''; //中文支持不够好,需要增加空格. setwindowlong(self.BtnClearFormula.Handle, gwl_style, getwindowlong(self.BtnClearFormula.Handle,gwl_style) or bs_multiline); 阅读全文
posted @ 2012-06-01 17:24 ftwsnow 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1. 将DbgridEh的Option里面的dgRowSelect和dgMultiSelect设为true,即可按住ctrl选择多行,但是这样的话不允许修改单元格 选择多行时,操作所选择的行 with ADOQryDetail do for i:=0 to (DBGridDetail.SelectedRows.Count - 1) do begin GotoBookmark(pointer(DBGridDetail.SelectedRows.Items[i])); with ADOQryDetail do begin First; while not Eof do begin ADOQryD. 阅读全文
posted @ 2012-06-01 17:20 ftwsnow 阅读(3433) 评论(0) 推荐(0) 编辑
摘要: 某些机器上可以使用,有些机器上不能使用.原因:缺少midas.dll 阅读全文
posted @ 2012-05-31 14:10 ftwsnow 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 由于 float 和 real 数据类型的这种近似性,当要求精确的数字状态时,比如在财务应用程序中,在那些需要舍入的操作中,或在等值核对的操作中,就不使用这些数据类型。这时就要用 integer、decimal、money 或 smallmone 数据类型。 在 WHERE 子句搜索条件中(特别是 = 和 <> 运算符),应避免使用 float 或 real 列。最好限制使用 float 和 real 列做 > 或 < 的比较。 阅读全文
posted @ 2012-05-31 14:09 ftwsnow 阅读(206) 评论(0) 推荐(0) 编辑
摘要: cb.Caption:=GetEnumName(TypeInfo(TGridOption),i)uses Typinfo单元 阅读全文
posted @ 2012-05-31 11:05 ftwsnow 阅读(169) 评论(0) 推荐(0) 编辑