论坛


2010年1月5日 星期二

开启和关闭防火墙

小城太阳| 网络天空vistra-Delphi |22:59:00

function Set_Windows_FireWall(Enable: boolean):boolean;// 需引用 winsvcvar   SCM, hService: LongWord;   sStatus: TServiceStatus;   Arg   : PChar;begin   Result := False;   SCM := Op...

◇[DELPHI]程序不出现在ALT+CTRL+DEL

幸福苹果| 幸福苹果-delphi |19:47:00

http://www.th7.cn/Article/bc/de/200709/66763_7.html在implementation后添加声明:function RegisterServiceProcess(dwProcessID, dwType: Integer): Integer; stdcall; external 'KERNEL32.DLL';RegisterServiceProcess(GetCurrentProcessID, 1);//隐藏RegisterSer...

控制Delphi的窗口显示位置

幸福苹果| 幸福苹果-delphi |19:46:00

   在使用Delphi进行工作时,也许需要将多个独立的窗口放在一个主窗口中,但有不打算使用多文档界面(MDI),那么下面介绍的方法可能对你会有所启发。直接控制窗口的产生过程,并指定它的容器对象即Parent属性或ParentWindow 属性。  使用容器。这个容器是指可?..

检测程序是否在优盘上运行

幸福苹果| 幸福苹果-delphi |19:45:00

http://fanself.yourblog.org/logs/3033284.html    var Drv, Pid: string;    Drv := ExtractFileDrive(ParamStr(0));    if GetDriveType(PChar(Drv + '\')) <> DRIVE_REMOVABLE then    ...

获取优盘的ID

幸福苹果| 幸福苹果-delphi |19:44:00

http://fanself.yourblog.org/logs/3033285.htmlfunction GetUSBDiskID(const DiskID: string; var PID: string): Boolean;varUSBGuid: TGUID;USBHandle: HDEVINFO;Success: LongBool;Devn: Integer;DevData: TSPDevInfoData;DeviceInterfaceData: TSPDeviceInterfac...

将被其他窗体遮住的窗体弹到最前面

幸福苹果| 幸福苹果-delphi |19:39:00

unit SysFocus;interfaceusesWindows,Messages,SysUtils,Classes,Graphics,Controls,Forms,Dialogs;typeTSysFocus=class(TComponent)publicfunction GetSysFocus:integer;function SetSysFocus(hwnd:integer):integer;end;implementationfunction TSysFoucs.GetSysFo...

將字串传入到Windows目前窗口Cursor所在位置

幸福苹果| 幸福苹果-delphi |19:38:00

网络ID:wnhoo or sos_admin网名:e梦缘Mail:wnhoo@163.com风花雪月 e梦情缘如下:function GetSysFocus : integer;VarhOtherWin,OtherThreadID,hFocusWin : integer;BeginhOtherWin := GetForegroundWindow;OtherThreadID := GetWindowThreadProcessID( hOtherWin, ni...

Delphi2007-Delphi2010 程序不出现在任务栏的方法

幸福苹果| 幸福苹果-delphi |19:36:00

http://hi.baidu.com/sail2000/blog/item/c2aaabecc7e2712d63d09f15.html2009-09-18 上午 09:28以前的代码:///////////////////////////////////////ShowWindow(Application.Handle,SW_HIDE);///////////////////////////////////////在 Delphi2007/2009/2010 已经?..

Delphi中,除了应用程序主窗口会显示在任务栏上,其它窗口默认都不会显示在任务栏.

幸福苹果| 幸福苹果-delphi |19:35:00

http://hi.baidu.com/jiljil/blog/item/9a90bd00ede00f83e950cda5.html2008-01-10 17:26Delphi中,除了应用程序主窗口会显示在任务栏上,其它窗口默认都不会显示在任务栏.没有MS开发环境中的ShowInTaskBar属性.解决办法:1.重载窗口 CreateParams 方法以实现,ShowInTask...