随笔分类 -  Delphi

枚举类型
摘要://获取枚举类型元素位置procedure TForm1.Button1Click(Sender: TObject);var d1: TMyData;begin d1 := black; ShowMessage(IntToStr(Integer(d1)));end;//获取枚举类型的字符串标识 需引用TypInfo单元procedure TForm1.Button2Click(Sender: TObject);var str: string;begin str := TypInfo.GetEnumName(TypeInfo(tmydata), 2); ShowMessage(str);end; 阅读全文
posted @ 2013-07-02 09:35 越中华 阅读(148) 评论(0) 推荐(0)
怎样调用BPL包中的过程???
摘要:转自http://topic.csdn.net/t/20030702/17/1983040.html一、在包中新建一个窗体单元,提供输出的函数,过程。unit frmDemo; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TDemoForm = class(TForm) Label1: TLabel; procedure Button1Click(... 阅读全文
posted @ 2012-09-17 10:03 越中华 阅读(986) 评论(0) 推荐(0)