当前位置:主页>仓库管理软件> 列表

如何判断一个按钮是无效的(灰色)?[在线等] 找仓库管理软件下载

记账软件版1楼: 如何判断窗体上一个按钮是灰色的(无效的)?并将它激活(变有效)??

2楼: if not Button1.Enabled then showmessage(''灰色的''); 如仓库管理软件下载

3楼: //------------------------------------------------------------------------------
function WindowEnabled(aHandle: HWND; aLparam: LPARAM): boolean; stdcall;
begin
if Not IsWindowEnabled(aHandle) then
begin
EnableWindow(aHandle,true);
end;
Result:=True;
end;

//------------------------------------------------------------------------------
function WindowDisEnabled(aHandle: HWND; aLparam: LPARAM): boolean; stdcall;
begin
if IsWindowEnabled(aHandle) then
begin
EnableWindow(aHandle,False);
end;
Result:=True;
end;

4楼: if not button1.enabled then button1.enabled:=true;

5楼: 结贴。

6楼: 接受答案了.