摘要: {*******************************************************}{ }{ 图形分析 }{ }{ 版权所有 (C) 2008 咏南工作室(陈新光) }{ }{*******************************************************}unit uChart;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, TeeProcs, TeEngine, C 阅读全文
posted @ 2008-04-14 11:09 delphi中间件 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 在单元初始化的时候:initialization WinExec('regsvr32.exe /s MyPlayX.ocx',sw_hide); 阅读全文
posted @ 2008-04-12 17:33 delphi中间件 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 最近解决了一个问题-减少内存占用。不过是有条件的,只能在WinXp,Win2K中应用此方法,不显示主窗体一直运行的程序最佳。以前程序占用11M内存,我用动态创建窗口的方法只能减少不到100K,应用此方法后内存占用只有496K。把下面的过程放到一个Timer中,每隔一段时间执行一次,如5秒。{*********** Clear Memory* From Muse2008**********}procedure ClearMemory;begin if Win32Platform = VER_PLATFORM_WIN32_NT then begin SetProcessWorkingSetS... 阅读全文
posted @ 2008-04-05 15:24 delphi中间件 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 提供一个系统空闲时间函数(ms),你可以用timer控件定时监测,如果系统空闲时间超过指定时间则做你想做的事:(系统空闲-指系统无任何操作,包括键盘和鼠标)function LastInput:dword;var LInput: TLastInputInfo;begin LInput.cbsize := sizeof(TLastInputInfo); GetLastInputInfo(LInput); result := GetTickCount - LInput.dwtime;end; 阅读全文
posted @ 2008-04-05 15:05 delphi中间件 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 我在淘宝上的二手书店,有空去看看!http://shop35357269.taobao.com/ XHTML... 阅读全文
posted @ 2008-04-05 14:41 delphi中间件 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 在Delphi中,事件实际上是专门化的属性,它是一个过程(procedure)的指针。要添加事件,首先应在所定义的类中说明一个用来指向事件过程的指针,该指针的作用是当事件一旦发生,就通过这个指针执行所指向的处理这个事件的过程。最后通过指定符 published公布定义的事件属性以及与之关联的事件处理过程指针。private FpCalc : TNotifyEvent;//事件处理过程指针published property OnpCalc:TNotifyevent read FpCalc write FpCalc;{定义事件属性名}procedure TForm1.pCalc(Sender: 阅读全文
posted @ 2008-04-05 14:31 delphi中间件 阅读(516) 评论(0) 推荐(0) 编辑
摘要: function MainApplicationHandle: HWND;var MainModule: HMODULE; CurrentPID: DWORD; WindowsPID: DWORD;begin MainModule := GetModuleHandle(nil); CurrentPID := GetCurrentProcessID(); Result := 0; while True do begin Result := FindWindowEx(0, Result, 'TApplication', nil); if (Result = 0) then Exit 阅读全文
posted @ 2008-04-05 14:15 delphi中间件 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 设置TreeView的DragMode = dmAutoMaticprocedure TFmMain.TreeLeftDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);begin Accept := False ; //if (source is TTreeNode) or (Source is TListItem) then if (source is TTreeView) or (source is TListview) then Accept := true . 阅读全文
posted @ 2008-04-05 13:40 delphi中间件 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 是否想为你的Windows加上一双眼睛,察看使用者在机器上所做的各种操作(例如建立、删除文件;改变文件或目录名字)呢? 这里介绍一种利用Windows未公开函数实现这个功能的方法。 在Windows下有一个未公开函数SHChangeNotifyRegister可以把你的窗口添加到系统的系统消息监视链中,该函数在Delphi中的定义如下: Function SHChangeNotifyRegister(hWnd,uFlags,dwEventID,uMSG,cItems:LongWord; lpps:PIDLSTRUCT):integer;stdcall;external 'She... 阅读全文
posted @ 2008-04-05 13:16 delphi中间件 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Delphi与C之间的类型对应表.其中左边是C类型,右边是对应的Delphi类型:ABC -> TABC ACCEL -> TAccel ATOM -> TAtom BITMAP -> TBitMap BITMAPCOREHEADER -> TBitmapCoreHeader BITMAPCOREINFO -> TBitmapCoreInfo BITMAPFILEHEADER -> TBitmapFileHeader BITMAPINFO -> TBitmapInfo BITMAPINFOHEADER -> TBitmapInfoHeade 阅读全文
posted @ 2008-04-03 09:33 delphi中间件 阅读(790) 评论(0) 推荐(0) 编辑