随笔- 267
文章- 27
评论- 28
阅读-
10万
06 2015 档案
简单地为DBNavigator填加Caption
摘要:http://bbs.2ccc.com/topic.asp?topicid=346735http://www.cnblogs.com/GarfieldTom/archive/2010/01/18/1650311.html
阅读全文
TEdit的 Clear 和 赋值 ''
摘要:function TControl.GetText: TCaption;var Len: Integer;begin Len := GetTextLen; SetString(Result, PChar(nil), Len); if Len 0 then GetTextBuf(Pointe...
阅读全文
How to pass string parameters to an TADOQuery?
摘要:http://4byte.cn/question/1130217/how-to-pass-string-parameters-to-an-tadoquery.html从2个答案看,如果TADOQuery组件是 设计时 创建的,运行时设置SQL语句后,参数对象自动存在了,只要赋值。如果是动态创建,还要...
阅读全文
delphi 高亮选中MEMO某一行
摘要:http://www.delphitop.com/html/kongjian/2641.html选中第5行//转到指定行并选中这行的文本procedure SelectLine(Memo1: TMemo; ln: Integer);begin Memo1.SelStart := SendMessa...
阅读全文
AnsiStartsStr 和 空字符串
摘要:function AnsiStartsStr(const ASubText, AText: string): Boolean;begin Result := AnsiSameStr(ASubText, Copy(AText, 1, Length(ASubText)));end;ASubText 是...
阅读全文
返回书签 GotoBookmark
摘要:property Bookmark: TBookmark read GetBookmark write GotoBookmark;直接给Bookmark属性赋值,还是 调用数据集GotoBookmark方法,都是一样的。都是调用GotoBookmark
阅读全文
Nexcel的行列,和单元格坐标
摘要:book.Sheets[1].UsedRange.Rows.Count 行数从1开始book.Sheets[1].UsedRange.LastCol 从0开始book.Sheets[1].Cells.Item[1, ICol] 这个行列都是从1 开始的
阅读全文
FR报表 FileName
摘要:在设计或者打印预览时,如果设置了FileName,可能反而出错。procedure TfrxReport.ShowPreparedReport;var WndExStyles: Integer;begin FPreviewForm := nil; if FPreview nil then ...
阅读全文
TMemo Ctrl + A
摘要:http://delphi.about.com/od/adptips2004/a/bltip0804_4.htmHere's how to implement the code for the CTRL+A key combination ("Select All") for TMemo or TD...
阅读全文
TClientDataSet 的Filename 和 open方法
摘要:cdsAdd.Open 不能用open,因为这个是DataSet的通用方法,不会检测文件名的,文件名是CDS特有的
阅读全文
System.Insert - 插入字符串
摘要:System.Insert - 插入字符串procedure Insert( Substr: String; {要插入的字符串; 可以是常量} var Dest: String; {源字符串} Index: Integer {从第几个字符前插入});举例:var ss,s: Wid...
阅读全文
TListBox的项目个数
摘要:function TCustomListBox.GetCount: Integer;begin if Style in [lbVirtual, lbVirtualOwnerDraw] then Result := FCount else Result := Items.Count;e...
阅读全文
XE7 Unit scope names
摘要:今天编译RM报表 7.0 for XE7 ,build设计时包,提示{$IFDEF JPEG}, JPEG{$ENDIF}没有找到 JPEG.DCU,这个应该是XE7自带。后来 在项目选项里,编译器,加个 VCL.IMAGING。给Delhi.命名空间 指定单元范围名称 前缀,使你可以在代码中和us...
阅读全文
RM报表,点击保存,为何每次都显示 另存为的对话框?
摘要:function TRMDesignerForm.FileSave: Boolean; var lSaved: Boolean; lFileName: string; begin Result := False; if DesignerRestrictions * [rmdrDontSaveReport] [] then Exit; if not FCodeMemo.Re...
阅读全文