whisht

    十年

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

随笔分类 -  Delphi

摘要:library Properties; { Important note about DLL memory management: ShareMem must be the first unit in your library's USES clause AND your project's (select Project-View Source) USES clause if your DLL exports any procedures or functions that pass strings as parameters or function results. Thi 阅读全文
posted @ 2013-05-23 13:23 WHISHT 阅读(287) 评论(0) 推荐(0)

摘要:usesActiveX;initialization CoInitialize(nil);Finalization CoUninitialize(); 阅读全文
posted @ 2012-07-19 16:16 WHISHT 阅读(193) 评论(0) 推荐(0)

摘要://取Exif信息functionGetExifItem(GPImage:TGPImage;ItemID:PROPID):String;varPropSize:UINT;PropItem:PPropertyItem;S:PChar;S1,S2:String;beginPropSize:=GPImage.GetPropertyItemSize(ItemID);ifPropSize=0thenbeginResult:='';Exit;end;GetMem(PropItem,PropSize);GPImage.GetPropertyItem(ItemID,PropSize,PropI 阅读全文
posted @ 2012-01-07 22:22 WHISHT 阅读(1103) 评论(0) 推荐(0)

摘要:打开安装目录下的WORDFILE.TXT,加入/L14"Delphi" Nocase Line Comment = // Block Comment On = { Block Comment On Alt = (* Block Comment Off = } Block Comment Off Alt = *) Escape Char = ?String Chars = ' File Extensions = pas dpr/Delimiters = #$&()*+,-./;<>@[]^{}' /Function String = &qu 阅读全文
posted @ 2011-11-20 19:00 WHISHT 阅读(667) 评论(0) 推荐(0)

摘要://调用键盘钩子,屏蔽功能键function keyHookProc(nCode: Integer; LWParam: WPARAM; LLParam: LPARAM): LRESULT; stdcall; var hHk :HHOOK; //创建勾子hHk:= SetWindowsHook... 阅读全文
posted @ 2011-11-16 21:23 WHISHT 阅读(219) 评论(0) 推荐(0)

摘要:1//调用键盘钩子,屏蔽功能键2functionkeyHookProc(nCode:Integer;LWParam:WPARAM;LLParam:LPARAM):LRESULT;stdcall;34var5hHk:HHOOK;67//创建勾子8hHk:=SetWindowsHookEx(13,@keyHookProc,HInstance,0);910functionkeyHookProc(nCode:Integer;LWParam:WPARAM;LLParam:LPARAM):LRESULT;//调用键盘钩子,屏蔽功能键11var12p:PKBDLLHOOKSTRUCT;13y:integer 阅读全文
posted @ 2011-11-16 21:23 WHISHT 阅读(821) 评论(0) 推荐(0)

摘要:1functionSetTaskBar(LVisible:Boolean):Boolean;//隐藏-显示任务条2var3h:THandle;4begin5ifLVisiblethen6begin7h:=FindWindow('Shell_TrayWnd',nil);8ShowWindow(h,SW_SHOW);//隐藏任务条9end10else11begin12h:=FindWindow('Shell_TrayWnd',nil);13ShowWindow(h,SW_HIDE);//显示任务条14end;15Result:=true;16end; 阅读全文
posted @ 2011-11-16 21:19 WHISHT 阅读(145) 评论(0) 推荐(0)

摘要:function SetTaskBar(LVisible: Boolean): Boolean; //隐藏-显示任务条var h: THandle;begin if LVisible then begin h:=FindWindow('Shell_TrayWnd',nil); Sh... 阅读全文
posted @ 2011-11-16 21:19 WHISHT 阅读(192) 评论(0) 推荐(0)

摘要:VC Unicode项目发送消息DELPHI代码var wData: String; h: HWND; cds: TCopyDataStruct;begin wData:= '1234567890'+ Chr(0); cds.dwData:= 0; cds.cbData:= Length(wData); cds.lpData:= PWideChar(wData); SendMessage(h, WM_COPYDATA, 0, LongWord(@cds));end非VC Unicode项目var wData: WideString; h: HWND; cds: TCopy... 阅读全文
posted @ 2011-10-24 14:24 WHISHT 阅读(477) 评论(0) 推荐(0)

摘要:<HTML><H2>控件测试 </H2><p><HR><center><P><OBJECT id='TestOCX' classid="clsid:3753F975-368A-4A19-94CB-1E800D8215FA" codebase="TestOCX.ocx#version=1,0,0,0"></OBJECT><mce:script language=javascript><!-- //设置属性 funct 阅读全文
posted @ 2011-03-04 16:06 WHISHT 阅读(925) 评论(0) 推荐(0)

摘要:unit AviWriter; ///////////////////////////////////////////////////////////////////////////// // // // AviWriter -- a component to create rudimentary AVI files // // by Elliott Shevin, with large... 阅读全文
posted @ 2011-01-27 09:26 WHISHT 阅读(1628) 评论(0) 推荐(0)

摘要:unit AviWriter; ///////////////////////////////////////////////////////////////////////////// // ... 阅读全文
posted @ 2011-01-27 09:26 WHISHT 阅读(227) 评论(0) 推荐(0)

摘要:Delphi创建OCX控件非常的方便,但IE调用时弹出的安全认证非常麻烦,有时OCX也不需要界面,IE调用时需要隐藏,非常不方便。在DELPHI中创建OCX实现安全接口和创建事件中修改部分代码实现安全接口继承:IObjectSafety重载方法: function GetInterfaceSafetyOptions(const IID: TIID; pdwSupportedOptions, //安全接口 pdwEnabledOptions: PDWORD): HResult; stdcall;function SetInterfaceSafetyOptions(cons... 阅读全文
posted @ 2010-11-29 13:39 WHISHT 阅读(1752) 评论(0) 推荐(0)