首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏完美Excel

    类模块应用示例:捕捉鼠标单击的单元格位置

    kbByte(0 To 255) As Byte End Type #If VBA7 Then Private Declare PtrSafe Function GetCursorPos Lib "user32 " (lpPoint As POINTAPI) As Long Private Declare PtrSafe Function GetKeyState Lib "user32" (ByVal nVirtKey Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer Private Declare Function GetActiveWindow Lib "user32 " () As Long Private Declare Function GetKeyboardState Lib "user32" (kbArray As KeyboardBytes) As Long

    1.1K30编辑于 2023-09-21
  • 来自专栏debugeeker的专栏

    source insight另一个coredump

    GetDC+0x6d 0006f350 77d28ea0 00000000 00440b6b 000f084a user32! GetDC+0x14f 0006f3a4 77d28eec 0185a660 00000116 00010bcd user32! DefFrameProcW+0xb3 0006f548 0042e3dc 000f084a 000a0acc 00000313 user32! GetDC+0x6d 0006f758 77d28ea0 00000000 00440b6b 000f084a user32! GetDC+0x14f 0006f7ac 77d28eec 0185a660 00000313 00000000 user32!

    51930发布于 2018-09-20
  • 来自专栏完美Excel

    VBA代码:处理剪贴板

    " () As Long Private Declare PtrSafe Function OpenClipboard Lib "user32" (ByVal hWnd As LongLong) As Long Private Declare PtrSafe Function EmptyClipboard Lib "user32" () As Long Private Declare PtrSafe Function CountClipboardFormats Lib "user32" () As Long Private Declare PtrSafe Function lstrcpy Lib " (ByVal wFormat As Long) As LongPtr Private Declare PtrSafe Function SetClipboardData Lib "user32" lpString2 As Any) As Long Private Declare Function GetClipboardData Lib "user32" (ByVal wFormat As

    1.4K30编辑于 2023-10-04
  • 来自专栏完美Excel

    VBA创建弹出菜单

    子菜单的标题部分是显示在父菜单上的选项 Public Caption As String Private Declare PtrSafe Function SetMenuDefaultItem Lib "User32 uItem As Long, ByVal fByPos As Long) As Long Private Declare PtrSafe Function CreatePopupMenu Lib "User32 " () As Long Private Declare PtrSafe Function DestroyMenu Lib "User32" (ByVal hMenu As Long) As Long Private Declare PtrSafe Function AppendMenu Lib "User32" Alias "AppendMenuA" (ByVal hMenu As Long, ByVal " (lpPoint As POINTL) As Long Private Declare PtrSafe Function GetDesktopWindow Lib "User32" () As Long

    1.7K40编辑于 2023-09-25
  • 来自专栏完美Excel

    VBA实战技巧06: 复制文本到剪贴板

    "() As LongPtr Private Declare PtrSafe Function OpenClipboard Lib "user32"(ByVal hwnd As LongPtr) As LongPtr Private Declare PtrSafe Function EmptyClipboard Lib "user32" ()As LongPtr Private Declare Any, _ ByVal lpString2 As Any) As LongPtr Private Declare PtrSafe Function SetClipboardData Lib "user32 " () AsLong Private Declare Function OpenClipboard Lib "user32" (ByValhwnd As Long) As Long Private Declare Function EmptyClipboard Lib "user32" () AsLong Private Declare Function lstrcpy Lib "kernel32

    8.2K40发布于 2020-04-22
  • 来自专栏VBA 学习

    VBA使用API_03:创建窗体

    Public Declare Function RegisterClass Lib "user32" Alias "RegisterClassA" (Class As WndClass) As Long Public Declare Function UnregisterClass Lib "user32" Alias "UnregisterClassA" (ByVal lpClassName As " (lpMsg As msg) As Long Public Declare Function DispatchMessage Lib "user32" Alias "DispatchMessageA As Long) As Long Public Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance " (ByVal nExitCode As Long) Public Declare Function DestroyWindow Lib "user32" (ByVal hWnd As Long) As

    2.4K20发布于 2020-07-28
  • 来自专栏全栈程序员必看

    java 刷屏器「建议收藏」

    WinDef.HWND; import com.sun.jna.win32.StdCallLibrary; public class Show_QQ_Window { public interface User32 extends StdCallLibrary { User32 INSTANCE = (User32) Native.loadLibrary("user32", User32.class winClass, String title); } public static void main(String[] args) throws AWTException { final User32 user32 = User32.INSTANCE; //获取当前菜单栏名为"Criyson"的聊天窗口,并将其置顶 HWND hWnd = user32.FindWindowA(null

    47110编辑于 2022-09-03
  • 来自专栏完美Excel

    Excel实战技巧58: 使用VBA创建进度条

    As Long) As Long Public Declare PtrSafe Function SetWindowLong _ Lib "user32 As String) As Long #Else Public Declare Function GetWindowLong _ Lib "user32 nIndex As Long) As Long Public Declare Function SetWindowLong _ Lib "user32 dwNewLong As Long) As Long Public Declare Function DrawMenuBar _ Lib"user32 ByVal hWnd As Long) As Long Public Declare Function FindWindowA _ Lib"user32

    7.4K30发布于 2019-11-07
  • 来自专栏walterlv - 吕毅的博客

    Windows 系统上用 .NET/C# 查找所有窗口,并获得窗口的标题、位置、尺寸、最小化、可见性等各种状态

    20 21 22 23 24 25 26 27 28 private delegate bool WndEnumProc(IntPtr hWnd, int lParam); [DllImport("user32 ")] private static extern bool EnumWindows(WndEnumProc lpEnumFunc, int lParam); [DllImport("user32") ] private static extern IntPtr GetParent(IntPtr hWnd); [DllImport("user32")] private static extern bool IsWindowVisible(IntPtr hWnd); [DllImport("user32")] private static extern int GetWindowText(IntPtr (IntPtr hWnd, StringBuilder lpString, int nMaxCount); [DllImport("user32")] private static extern bool

    3.3K30编辑于 2023-10-22
  • 来自专栏加菲猫的VFP

    把表单放大看看,好玩的不只一点点

    = ReleaseDC(hDstWin, hDstDC) ENDIF PROCEDURE declare DECLARE INTEGER GetActiveWindow IN user32 DECLARE INTEGER GetCursorPos IN user32 STRING @lpPoint DECLARE INTEGER GetWindowDC IN user32 INTEGER hwnd DECLARE INTEGER GetDC IN user32 INTEGER hwnd DECLARE INTEGER GetFocus IN user32 DECLARE INTEGER ReleaseDC IN user32; INTEGER hWindow, INTEGER hdc DECLARE INTEGER ScreenToClient IN user32

    29810编辑于 2023-08-21
  • 来自专栏大师级码师

    VB实现屏蔽文本框右键菜单的复制、粘贴等功能的方法

    =========================================Option ExplicitPrivate Declare Function SetWindowText Lib "user32 (ByVal hwnd As Long, ByVal lpString As String) As LongPrivate Declare Function CallWindowProc Lib "user32 Long, ByVal wParam As Long, ByVal lParam As Long) As LongPrivate Declare Function GetWindowLong Lib "user32 GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As LongPrivate Declare Function SetWindowLong Lib "user32

    1.4K00编辑于 2022-11-06
  • 来自专栏完美Excel

    创建可调大小的用户窗体——使用Windows API

    Const WS_THICKFRAME = &H40000 #If VBA7 Then Public Declare PtrSafe Function GetWindowLong _ Lib "user32 hWnd As Long, ByVal nIndex As Long) As Long Public Declare PtrSafe Function SetWindowLong _ Lib "user32 Long, _ ByVal dwNewLong As Long) As Long Public Declare PtrSafe Function DrawMenuBar _ Lib "user32 " (ByVal hWnd As Long) As Long Public Declare PtrSafe Function FindWindowA _ Lib "user32" (ByVal _ ByVal lpWindowName As String) As Long #Else Public Declare Function GetWindowLong _ Lib "user32

    2K31编辑于 2023-08-29
  • 来自专栏完美Excel

    将用户窗体保存为PDF

    Right As Long Bottom As Long End Type Private Declare PtrSafe Function _ GetActiveWindow& Lib "user32 " () Private Declare PtrSafe Sub GetWindowRect Lib _ "user32" (ByVal hwnd&, lpRect As RECT) Private Declare PtrSafe Function _ GetDesktopWindow& Lib "user32" () '剪贴板操作 Private Declare PtrSafe Function _ OpenClipboard& Lib "user32" (ByVal hwnd&) Private Declare PtrSafe Function _ CloseClipboard& Lib "user32" () Private Declare PtrSafe Function SetClipboardData& _ Lib "user32" (ByVal wFormat&, ByVal

    61410编辑于 2024-05-22
  • 来自专栏Golang语言社区

    【Go 语言社区】转-golang windows 判断锁屏

    desktop ) // get desktop locked status func ScreenIsLocked() bool { // load user32.dll only once user32 := win.MustLoadLibrary("user32.dll") openDesktop := win.MustGetProcAddress(user32, "OpenDesktopW ") closeDesktop := win.MustGetProcAddress(user32, "CloseDesktop") switchDesktop := win.MustGetProcAddress (user32, "SwitchDesktop") var lpdzDesktopPtr uintptr = uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr

    1.1K70发布于 2018-03-20
  • 来自专栏landv

    vb.net_一个半成品

    lpClassName As String, ByVal lpWindowName As String) As IntPtr Private Declare Function FindWindowEx Lib "user32 wParam As Integer, ByVal lParam As String) As Integer 'Private Declare Function CheckDlgButton Lib "user32 ByVal nMaxCount As Integer) As Integer 'Private Declare Function GetWindowThreadProcessId Lib "user32 ByVal lpdwProcessId As Long) As Integer Private Declare Auto Function GetWindowTextLength Lib "user32 As StringBuilder, ByVal cch As Integer) As Integer 'Private Declare Function MapVirtualKey Lib "user32

    98240发布于 2018-05-24
  • 来自专栏鸿鹄实验室

    抛砖引玉之CobaltStrike4.1的BOF

    那么 OpenClipboard 在BOF中则是: DECLSPEC_IMPORT WINUSERAPI BOOL WINAPI USER32$OpenClipboard (HWND); 剩下的就好说了 DECLSPEC_IMPORT HWND WINAPI KERNEL32$GetConsoleWindow(void); DECLSPEC_IMPORT WINUSERAPI BOOL WINAPI USER32 $OpenClipboard(HWND); DECLSPEC_IMPORT WINUSERAPI HANDLE WINAPI USER32$GetClipboardData(UINT); DECLSPEC_IMPORT (); USER32$OpenClipboard(owner); owner = USER32$GetClipboardData(CF_TEXT); BeaconPrintf( CALLBACK_OUTPUT, "%s\n", (char *)owner);; USER32$CloseClipboard(); } 然后编译: x86_64-w64-mingw32-gcc

    1.5K20发布于 2021-04-15
  • 来自专栏完美Excel

    VBA实用小程序51: 将图表导出为图片(API版)

    代码如下: Declare Function OpenClipboard _ Lib "user32" _ (ByVal hwnd As Long) As Long Declare Function CloseClipboard _ Lib "user32" () As Long Declare Function GetClipboardData _ Lib "user32" _ (ByVal wFormat As Long) As Long Declare Function EmptyClipboard _ Lib "user32" () As Long Declare

    2.2K30发布于 2019-07-19
  • 来自专栏大师级码师

    VB的TextBox文本框实现垂直居中显示的方法

    Long Top As Long Right As Long Bottom As LongEnd TypePrivate Declare Function SendMessage Lib "user32 wMsg As Long, ByVal wParam As Long, lParam As Any) As LongPrivate Declare Function SetWindowText Lib "user32 (ByVal hwnd As Long, ByVal lpString As String) As LongPrivate Declare Function CallWindowProc Lib "user32 Long, ByVal wParam As Long, ByVal lParam As Long) As LongPrivate Declare Function GetWindowLong Lib "user32 GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As LongPrivate Declare Function SetWindowLong Lib "user32

    4.1K10编辑于 2022-11-06
  • 来自专栏Eureka的技术时光轴

    KeUserModeCallback用法详解(Ring0调用Ring3代码)

    __fnCOPYDATA 77d12974 77d583ac USER32!__fnCOPYGLOBALDATA ... 77d12a5c 77d3f5cb USER32! __ClientFreeLibrary 77d12a60 77d3a3fc USER32!__ClientGetCharsetInfo 77d12a64 77d58a7c USER32! __ClientGetDDEFlags 77d12a68 77d58bd5 USER32!__ClientGetDDEHookData 77d12a6c 77d4f715 USER32! __ClientGetMessageMPH 77d12a74 77d3aa6d USER32!__ClientLoadImage 77d12a78 77d3dc84 USER32! __ClientLoadLibrary和USER32!

    3K10发布于 2020-03-19
  • 来自专栏加菲猫的VFP

    显示文件和文件夹的关联图标和说明

    dwFileAttributes,; STRING @psfi, LONG cbFileInfo, LONG uFlags DECLARE INTEGER SendMessage IN user32 INTEGER hWindow, INTEGER Msg,; INTEGER wParam, INTEGER lParam DECLARE INTEGER SendMessage IN user32 ; INTEGER hWindow, INTEGER nIndex, INTEGER dwNewLong DECLARE INTEGER GetWindowLong IN user32; INTEGER hWindow, INTEGER nIndex DECLARE INTEGER GetWindowDC IN user32 INTEGER hWindow DECLARE INTEGER SystemParametersInfo IN user32; INTEGER uiAction, INTEGER uiParam,; STRING @pvParam,

    52241编辑于 2023-08-21
领券