2008年9月7日
摘要: //动态创建四级菜单var MainMenu:TMainMenu; SubMenu,SubMenu2,submenu3,submenu4:TMenuItem; MainMenu:=TMainMenu.Create(self); MainMenu.AutoHotkeys:=maManual; SubMenu:=TMenuItem.Create(self); SubMenu.Caption:='一级菜单'; MainMenu.Items.Add(SubMenu); SubMenu2:=TMenuItem.Create(self); SubMenu2.Caption:='二级菜单'; SubMe 阅读全文
posted @ 2008-09-07 12:36 漂流侠 阅读(302) 评论(0) 推荐(0) 编辑
摘要: {*******************************************************}{ }{进制转换 }{ }{ cxg 2008-08-23 08:52:16 }{ }{*******************************************************}unit uStrUnit;interfaceuses SysUtils, StrUtils, Windows, Classes, WinSock, Forms, Controls, Dialogs;const cHexBinStrings: array[0..15] of strin 阅读全文
posted @ 2008-09-07 12:30 漂流侠 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 获取当前系统版本号 阅读全文
posted @ 2008-09-07 12:27 漂流侠 阅读(472) 评论(0) 推荐(0) 编辑
摘要: 防止程序重复执行的单元 阅读全文
posted @ 2008-09-07 12:26 漂流侠 阅读(198) 评论(0) 推荐(0) 编辑
摘要: {*******************************************************}{ }{ 操作TreeView }{ }{ 版权所有 (C) 2008 咏南工作室 }{ }{*******************************************************}//==============================================================================// 本单元实现了TreeView与数据的关联,各方法形参如下://// AId:为自增字段,用于标识节点的编号。// 阅读全文
posted @ 2008-09-07 12:23 漂流侠 阅读(375) 评论(0) 推荐(0) 编辑
摘要: //Delphi服务程序注册与卸载uses winsvc;function InstallService(ServiceName, DisplayName, FileName: string): boolean;varSCManager,Service: THandle;Args: pchar;beginResult := False;SCManager := OpenSCManager(nil, nil, SC_MANAGER_ALL_ACCESS);if SCManager = 0 then Exit;try Service := CreateService(SCManager, //句柄 阅读全文
posted @ 2008-09-07 11:42 漂流侠 阅读(738) 评论(0) 推荐(0) 编辑
摘要: uses TypInfoprocedure SetImeA(AOwner:TForm);var i:Integer;begin for i := 0 to AOwner.ComponentCount - 1 do begin if GetPropInfo(AOwner.Components[i],'ImeName')nil then begin SetPropValue(AOwner.Components[i],'ImeName', readinifile(getinifile,'ime','imename','')); end; end; end; 阅读全文
posted @ 2008-09-07 11:41 漂流侠 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 1.加权移动平均核算成本单价=(不含税库存金额+不含税入库金额)/(库存数量+入库数量)2.先进先出按进货时的单价及数量记录序列,以日期升序提取进价作为销售出库成本单价,核算出库成本金额。3.后进先出按进货时的单价及数量记录序列,以日期降序提取进价作为销售出库成本单价,核算出库成本金额。 4.高进先出按进货时的单价及数量记录序列,以单价降序提取进价作为销售出库成本单价,核算出库成本金额。 5.低进先出按进货时的单价及数量记录序列,以单价升序提取进价作为销售出库成本单价,核算出库成本金额。6.最高进价在进货时比较刷新最高进价记录,以此进价作为销售出库成本单价,核算出库成本金额。7.最低进价在进货 阅读全文
posted @ 2008-09-07 11:30 漂流侠 阅读(2570) 评论(0) 推荐(0) 编辑
摘要: uses Windows, Messages, SysUtils, Classes, Graphics, JPEG;function BmpToJpeg(Sou:TFileName;Des:TFileName):Boolean; //bmp转换成jpgfunction BmpToEmf(Sou:TFileName;Des:TFileName):Boolean; //bmp转换成emffunction BmpToWmf(Sou:TFileName;Des:TFileName):Boolean; //bmp转换成wmffunction BmpToIcon(Sou:TFileName;Des:Til 阅读全文
posted @ 2008-09-07 11:23 漂流侠 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 首先,在主窗体中声明以下private过程:procedure TMainForm.DoEnterAsTab(var Msg: TMsg; var Handled: Boolean);beginif Msg.Message = WM_KEYDOWN thenbeginif Msg.wParam = VK_RETURN thenKeybd_event(VK_TAB, 0, 0, 0);end; //ifend;在主窗体的OnCreate事件中加入:Application.OnMessage := DoEnterAsTab; 阅读全文
posted @ 2008-09-07 11:22 漂流侠 阅读(193) 评论(0) 推荐(0) 编辑