摘要: try ....(需要执行的代码)except on e:exception do application.MessageBox(pchar(e.Message), '错误提示', 0);end; 阅读全文
posted @ 2011-08-15 13:38 aBung 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 核心提示:【函数名】 GetTickCount【库名】 kernel32【适用范围】 95/98/ME/NT/2000/XP...【说明】 用于获取自windows启动以来经历的时间长度(毫秒)【返回值】 Long,以毫秒为单位的windows运行时间通常用来计算某个操作所使用的时间: Start:=GetTickCount; ...//执行耗时的操作Stop:=GetTickCount; TimeUsed:=(Stop-Start)/1000; //使用了xxx秒也可以用来做延时程序:Procedure TForm1.Delay(Msecs: Integer);var firstTickCo 阅读全文
posted @ 2011-08-08 08:18 aBung 阅读(12921) 评论(0) 推荐(0) 编辑
摘要: Dim firstName,radioButtonValue As String firstName=movie.GetVariable"FirstName" radioButtonValue=movie.GetVariable("/Form/RadioButton:Value") 24、IsPlaying 语法:IsPlaying() As Boolean 说明:如果影片正在播放则返回true。 例子: If movie.IsPlayingThen MsgBox"影片正在播放中!" End If 25.PercentLoaded 语 阅读全文
posted @ 2011-07-30 13:11 aBung 阅读(1162) 评论(0) 推荐(0) 编辑
摘要: unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private { Private declarations } public 阅读全文
posted @ 2011-07-27 08:57 aBung 阅读(2212) 评论(0) 推荐(0) 编辑
摘要: 1 unit Unit1; 2 3 interface 4 5 uses 6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 Dialogs, StdCtrls; 8 9 type10 TForm1 = class(TForm)11 Button1: TButton;12 Button2: TButton;13 procedure Button1Click(Sender: TObject);14 procedure Button2Click(Sender: TObject);15 pri. 阅读全文
posted @ 2011-07-26 17:07 aBung 阅读(439) 评论(0) 推荐(0) 编辑
摘要: 形式 function StrToIntDef(const S: string; Default: Integer): Integer;引用单元 SysUtils.pas功能 返回字符串S转换成整数说明 字符串非整数表达时则返回默认值Default参考 procedure System.Val例子 SpinEdit1.Value := StrToIntDef(Edit1.Text, 0);返回int(Edit1.Text) 如果不成功,返回0例子代码:procedure TForm1.btn1Click(Sender: TObject);var i:Integer; S:string;begi 阅读全文
posted @ 2011-07-14 19:01 aBung 阅读(6691) 评论(0) 推荐(0) 编辑
摘要: C# 获取当前路径方法//获取包含清单的已加载文件的路径或 UNC 位置。 public static string sApplicationPath = Assembly.GetExecutingAssembly ( ).Location; //result: X:\xxx\xxx\xxx.dll (.dll文件所在的目录+.dll文件名) //获取当前进程的完整路径,包含文件名(进程名)。 string str = this.GetType ( ).Assembly.Location; //result: X:\xxx\xxx\xxx.exe (.exe文件所在的目录+.exe文件名) / 阅读全文
posted @ 2011-06-23 08:25 aBung 阅读(224) 评论(0) 推荐(0) 编辑
摘要: function ListFiles(Dir: String):TStrings;var FSearchRec: TSearchRec; FileList: TStrings; FindResult: Integer;begin if Dir[length(Dir)]<>'\' then Dir:=Dir+'\'; FileList :=TStringList.Create; FindResult:=FindFirst(Dir+'*.ini',faAnyFile+faDirectory,FSearchRec); //只历遍INI文件类 阅读全文
posted @ 2011-05-21 07:58 aBung 阅读(378) 评论(0) 推荐(0) 编辑
摘要: procedure TForm1.N1Click(Sender: TObject);var GridtoExcel: TDBGridEhToExcel;begin try GridtoExcel := TDBGridEhToExcel.Create(nil); GridtoExcel.DBGridEh := DBGridEh1; //需要导出数据的DBGridEh文件名 GridtoExcel.TitleName := 'EXCEL的标题'; //根据需要自行修改 GridtoExcel.ShowProgress := true; GridtoExcel.ShowOpenExc 阅读全文
posted @ 2011-05-21 07:55 aBung 阅读(2087) 评论(0) 推荐(0) 编辑
摘要: var i:Integer; Series:array of TFastLineSeries; //这里最好写在全局变量中begin SetLength(Series,MyTHead.Count); Chart1.SeriesList.Clear; for i:= 0 to MyTHead.Count-1 do //MyTHead是一个Tstringlist,根据MyTHead来动态创建曲线的数量 begin Series[i]:=TFastLineSeries.Create(nil); Series[i].ParentChart:= Chart1; //在名为CHART1的组件上建曲线 Se 阅读全文
posted @ 2011-05-21 07:48 aBung 阅读(2254) 评论(0) 推荐(0) 编辑