当from的Enabled为false时不能改变Cursor?

abc3000 2007-02-23 01:51:14
如题: 下面的代码不能达到要求改变Cursor的要求

请问该怎么修改,谢谢!!

Self.Cursor:=crHourGlass;
Screen.Cursor:=crHourGlass;
Self.Enabled:=false;
Self.Cursor:=crHourGlass;
Screen.Cursor:=crHourGlass;
...全文
255 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
namehzf 2007-02-26
  • 打赏
  • 举报
回复
路过 的 顶顶
withcsharp 2007-02-25
  • 打赏
  • 举报
回复
procedure TForm1.Button1Click(Sender: TObject);
begin
Panel_client.Enabled := false;
Screen.Cursor := crHourGlass;
end;


object Panel_client: TPanel
Left = 0
Top = 0
Width = 688
Height = 453
Align = alClient
BevelOuter = bvNone
TabOrder = 0

原因 Enabled := false 的窗体 捕获鼠标
由windows 处理 鼠标

可以用一个 Align = alClient 的Panel处理

The SetCursor function establishes the cursor shape.

The cursor is a shared resource. A window should set the cursor shape only when the cursor is in its client area or when the window is capturing mouse input. In systems without a mouse, the window should restore the previous cursor before the cursor leaves the client area or before it relinquishes control to another window.
abc3000 2007-02-25
  • 打赏
  • 举报
回复
UP
快乐老猫 2007-02-24
  • 打赏
  • 举报
回复
子窗体每问题,主窗体的确出现这个问题了。需要找原因。
Eddie005 2007-02-24
  • 打赏
  • 举报
回复
路过顶~
abc3000 2007-02-23
  • 打赏
  • 举报
回复
up

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧