最新发布第2页
排序
Delphi WinAPI: GetParent – 获取指定窗口的父窗口句柄
WinAPI: GetParent - 获取指定窗口的父窗口句柄//声明:GetParent( hWnd: HWND {窗口句柄}): HWND; {返回父窗口句柄}//举例:procedure TForm1.Button1Click(Sender: TO...
Delphi WinAPI: GetParent – 判断两个窗口是不是父子关系
WinAPI: GetParent - 判断两个窗口是不是父子关系//声明:IsChild( hWndParent, hWnd: HWND {参数是两个窗口句柄, 父窗口在前}): BOOL;
Delphi WinAPI: IsIconic、IsZoomed – 分别判断窗口是否已最小化、最大化
WinAPI: IsIconic、IsZoomed - 分别判断窗口是否已最小化、最大化//声明:IsIconic( hWnd: HWND {窗口句柄}): BOOL;IsZoomed( hWnd: HWND {窗口句柄}): BOOL;
Delphi WinAPI: MoveWindow – 改变窗口的位置与大小
//声明:MoveWindow( hWnd: HWND; {窗口句柄} X, Y: Integer; {位置} nWi...
Delphi WinAPI: WindowFromPoint- 获取指定点所在窗口的句柄
WinAPI: WindowFromPoint- 获取指定点所在窗口的句柄//声明:WindowFromPoint(Point: TPoint): HWND;//举例:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, G...
Delphi WinAPI: GetWindowRect、GetClientRect – 获取窗口的外部与内部矩形
WinAPI: GetWindowRect、GetClientRect - 获取窗口的外部与内部矩形提示:1、其实用 Delphi 内部同类函数很方便的, 但系统函数是全局的;2、使用 GetClientRect 时, 一般要 Windows.GetClientRect...
Delphi WinApi: GetParent、SetParent、MoveWindow – 获取、指定父窗口和移动窗口
提示: SetParent 应该 Windows.SetParent, 因为 TForm 的父类有同名方法.//声明:{获取父窗口句柄}GetParent(hWnd: HWND): HWND;{指定父窗口}SetParent( hWndChild: HWND; {...
Delphi WinAPI: ShellExecute – 打开外部程序或文件
ShellExecute( hWnd: HWND; {指定父窗口句柄} Operation: PChar; {指定动作, 譬如: open、print} FileName: PChar; {指定要打...
Delphi WinAPI: GetCurrentThread、GetCurrentThreadId、GetCurrentProcess、GetCurrentProcessId
WinAPI: GetCurrentThread、GetCurrentThreadId、GetCurrentProcess、GetCurrentProcessId{返回当前线程的虚拟句柄}GetCurrentThread: THandle;{返回当前线程 ID}GetCurrentThreadId: DWORD;{返...
Delphi WinAPI: GetWindowThreadProcessId – 获取指定窗口的进程 ID 或线程 ID
WinAPI: GetWindowThreadProcessId - 获取指定窗口的进程 ID 或线程 ID//声明:GetWindowThreadProcessId( hWnd: HWND; {...
Delphi WinAPI: OpenProcess、GetExitCodeProcess、TerminateProcess (QQ)
//声明:{返回进程的句柄}OpenProcess( dwDesiredAccess: DWORD; {访问选项} bInheritHandle: BOOL; {能否继承; True 表示能用 CreateProcess 继承句柄创建新进...
Delphi WinAPI: GetModuleHandle – 获取一个模块(exe 或 dll)的句柄
定义:GetModuleHandle( lpModuleName: PChar {模块名; 只能是映射到当前进程的模块}): HMODULE; {返回模块句柄; 0 表示失败}举例://获取当前模...
Delphi WinAPI: GetModuleFileName、GetModuleHandle
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Butt...
Delphi SetWindowsHookEx – 设置钩子 UnhookWindowsHookEx – 卸掉钩子
提示: 如果要设置系统级钩子, 钩子函数必须在 DLL 中.SetWindowsHookEx( idHook: Integer; {钩子类型} lpfn: TFNHookProc; {函数指针} hmod: HINST;  ...
Delphi WinAPI: GetDesktopWindow – 返回桌面窗口的句柄
WinAPI: GetDesktopWindow - 返回桌面窗口的句柄//声明:GetDesktopWindow: HWND; {无参数; 返回桌面窗口的句柄}//举例:var h: HWND;begin h := GetDesktopWindow; ShowMessag...
Delphi WinAPI: SetWindowText – 设置窗口标题
WinAPI: SetWindowText - 设置窗口标题//声明:SetWindowText( hWnd: HWND; {窗口句柄} lpString: PChar {新标题串指针}): BOOL;//举例:var s: string;beg...
Delphi WinAPI: GetWindowText – 获取窗口标题
WinAPI: GetWindowText - 获取窗口标题//声明:GetWindowText( hWnd: HWND; {窗口句柄} lpString: PChar; {接收文本的缓冲区的指针} ...
Delphi WinAPI: GetWindowTextLength – 获取窗口标题长度
WinAPI: GetWindowTextLength - 获取窗口标题长度//声明:GetWindowTextLength( hWnd: HWND {窗口句柄}): Integer; {返回窗口标题长度}//举例:var i: Integer;begin i :...
Delphi WinAPI: GetForegroundWindow – 获取前台窗口的句柄
WinAPI: GetForegroundWindow - 获取前台窗口的句柄//声明:GetForegroundWindow: HWND;//举例:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Con...
Delphi WinAPI: GetWindow – 获取与指定窗口具有指定关系的窗口的句柄
WinAPI: GetWindow - 获取与指定窗口具有指定关系的窗口的句柄//声明:GetWindow( hWnd: HWND; {指定的窗口句柄} uCmd: UINT {指定的关系选项}): HWND; {...
Delphi WinAPI: GetTopWindow – 获取指定窗口的子窗口中最顶层的窗口句柄
WinAPI: GetTopWindow - 获取指定窗口的子窗口中最顶层的窗口句柄//声明:GetTopWindow( hWnd: HWND; {指定的窗口句柄}): HWND; {失败返回0; 成功返回最顶层的子窗口...
Delphi WinAPI: GetNextWindow – 获取指定窗口Z上或Z下的窗口的句柄
WinAPI: GetNextWindow - 获取指定窗口Z上或Z下的窗口的句柄//声明:GetNextWindow( hWnd: HWND; {指定的窗口句柄} uCmd: UINT {指定的关系选项}): HWND; ...
Delphi WinAPI: GetClassName – 获取指定窗口的类名
//声明:GetClassName( hWnd: HWND; {指定窗口句柄} lpClassName: PChar; {缓冲区} nMaxCount: Integer {缓冲区大小}): Integer;&nbs...
Delphi WinAPI: FindWindow、FindWindowEx – 查找窗口
FindWindow( lpClassName, {窗口的类名} lpWindowName: PChar {窗口的标题}): HWND; {返回窗口的句...
Delphi WinAPI: SetLayeredWindowAttributes – 设置窗口的透明
//声明:SetLayeredWindowAttributes( Hwnd: THandle; {窗口句柄} crKey: COLORREF; {透明色} bAlpha: Byte; {Alpha 值} dwFlags: DWORD ...
Delphi 获取窗口矩形的四种方法: GetClientRect、ClientRect、GetWindowRect、BoundsRect
获取窗口矩形的四种方法: GetClientRect、ClientRect、GetWindowRect、BoundsRect其中 GetClientRect、ClientRect 获取的是窗口的客户区矩形;GetWindowRect、BoundsRect 是获取窗口矩形;另外, ...
Delphi GetForegroundWindow 与 GetActiveWindow 的区别
GetActiveWindow 只是获取当前程序中(严格地说是线程中)被激活的窗口;GetForegroundWindow 是获取当前系统中被激活的窗口.两个函数的级别不一样, 一个是线程级、一个是系统级.被激活的窗口不一...
Delphi 详解 EnumWindows 与 EnumWindowsProc
// EnumWindows 的功能是遍历所有顶层窗口function EnumWindows( lpEnumFunc: TFNWndEnumProc; {回调函数指针} lParam: LPARAM {...
Delphi WinAPI: LoadString – 从资源中载入字符串
WinAPI: LoadString - 从资源中载入字符串//声明:LoadString( hInstance: HINST; {EXE 或 DLL 的句柄} uID: UINT; {资源 ID} ...
delphi在网格cxGrid的左上角放置一个按钮
Button1.Parent := cxGrid1; Button1.BoundsRect := cxGrid1DBTableView1.ViewInfo.IndicatorViewInfo.Bounds; Button1.Height := cxGrid1DBTableView1.ViewInfo.Records...