Private Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long Private Declare Function EnableWindow Lib "user32" Alias "EnableWindow" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
Private Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long Private Declare Function EnableWindow Lib "user32" Alias "EnableWindow" (ByVal hwnd As Long, ByVal fEnable As Long) As Long这两个函数是设置的,我要的是获取属性,不是设置属性
Public Declare Function IsWindowEnabled Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function IsWindowVisible Lib "user32" Alias "IsWindowVisible" (ByVal hwnd As Long) As Long Private Declare Function IsWindowEnabled Lib "user32" Alias "IsWindowEnabled" (ByVal hwnd As Long) As Long
dim nEnable as boolean,nVisible as boolean nEnable=(WS_DISABLED and GetWindowLong(hwnd,GWL_STYLE)) nVisible=(WS_VISIBLE and GetWindowLong(hwnd,GWL_STYLE))自己试试临时打出来的 不知道有没笔误
Private Declare Function EnableWindow Lib "user32" Alias "EnableWindow" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
Private Declare Function EnableWindow Lib "user32" Alias "EnableWindow" (ByVal hwnd As Long, ByVal fEnable As Long) As Long这两个函数是设置的,我要的是获取属性,不是设置属性
Private Declare Function IsWindowEnabled Lib "user32" Alias "IsWindowEnabled" (ByVal hwnd As Long) As Long
nEnable=(WS_DISABLED and GetWindowLong(hwnd,GWL_STYLE))
nVisible=(WS_VISIBLE and GetWindowLong(hwnd,GWL_STYLE))自己试试临时打出来的 不知道有没笔误
用if判断一下即可