
基础类
文章平均质量分 63
日总是我哥
日总是我哥
展开
-
使TStringGrid自适应宽度
procedure AutoFitable(AGrids: TStringGrid);//传入TStringGrid对像即可, 2004/10/28,CoolSlobvar I, J: Integer; MaxLenRow: Integer; CurRowLen: Integer;begin inherited; for J := 0 to AGrids.ColCount - 1 do原创 2004-12-16 18:45:00 · 2279 阅读 · 2 评论 -
Getting the System Version(获取操作系统版本)
http://msdn.microsoft.com/en-us/library/ms724429(VS.85).aspxThe following example uses the GetVersionEx, GetSystemMetrics, GetProductInfo, and GetNativeSystemInfofunctions to determine转载 2008-11-04 14:34:00 · 1781 阅读 · 0 评论 -
突破LoadStr 1024个字符的限制
(源自:http://community.youkuaiyun.com/expert/Topicview1.asp?id=4950441)function LoadStr(Ident: Integer): string;begin Result := FindStringResource(Ident);end;->function FindStringResource(Ident: Integer): st原创 2006-08-23 16:44:00 · 2018 阅读 · 1 评论 -
为什么还有人在dll函数声明头中使用export指示字?---说export的用法
这里摘抄Delphi7帮助文档中的一段:Calling conventionsWhen you declare a procedure or function, you can specify a calling convention using one of the directives register, pascal, cdecl, stdcall, and safecall. Fo原创 2006-07-31 09:42:00 · 1972 阅读 · 2 评论 -
用DrawDibDraw显示BMP文件
作者:CoolSlob功能:码用于完成在Panel上显示一个BMP文件(现多信息请参阅BMP文件结构相关文章)var dc:HDC; hdd:HDRAWDIB; Stream: TStream; hdr: BITMAPFILEHEADER; m_pbmih: TBITMAPINFOHEADER; BITMAP_TYPE: WORD; S: string; len: Inte原创 2006-04-22 13:12:00 · 8882 阅读 · 1 评论 -
Delphi程序慎用XPManifest
Delphi开发程序使用XPManifest控件,将导致在删除(使用Backspace健)ComboBox内容时出现乱码。经跟踪发现,在执行以下过程的HasSelectedText函数部分(附文章结尾),通过SendMessage发送CB_GETEDITSEL消息返回的StartPos、EndPos值发生错误。问题的重现:1、新建一工具,在窗口上分别放置一个XPManifest和一个Com原创 2006-04-07 14:12:00 · 5907 阅读 · 2 评论 -
导出StringGrid内容到Excel
function ExportStrGridToExcel(Args: array of const): Boolean;var iCount, jCount: Integer; XLApp: Variant; Sheet: Variant; I: Integer;begin Result := False; if not VarIsEmpty(XLApp) then begin原创 2005-10-23 20:37:00 · 3715 阅读 · 1 评论 -
Delphi中DCOM的调试
自己在调试时忘记了第3步,结果总是调试不成功,写到blog上,记录一下1、设置host为%system32%/hostdll.exe (注意把system32替换成实际的路径)2. 把parameters设置成/processID:{4181FE23-F8E7-4B43-BC12-0B771711EB9E} (注意后面的是应程程序ID)3. 选中"Include TD32 Debug Info"和原创 2005-08-02 08:55:00 · 3354 阅读 · 0 评论 -
模拟Nokia手机输入的编辑框
{功能:模拟Nokia手机的输入法控件,继承自TCustomEdit作者:CoolSlob支持:CoolSlob # 163.com 最后更新:2004/12/11}unit NokiaEdit;interfaceuses SysUtils, Classes, Controls, StdCtrls, ExtCtrls, Dialogs;type KeysetInt = -1..9;原创 2004-12-16 18:33:00 · 1518 阅读 · 0 评论 -
批处理中实现数字累加
传说中的goto程序:)echo offset i=0:loopset /a i=%i%+1if %i% GEQ 100 goto endgoto loop:endecho %i%关于批处理比较符号的说明:EQU - 等于NEQ - 不等于LSS - 小于LEQ - 小于或等于GTR - 大于GEQ - 大于或等于原创 2008-11-04 17:24:00 · 6857 阅读 · 0 评论