# win.ui.ctrl.hotkey 库模块帮助文档

## win.ui.ctrl 成员列表 <a id="win.ui.ctrl" href="#win.ui.ctrl">&#x23;</a>

### win.ui.ctrl.hotkey() <a id="win.ui.ctrl.hotkey" href="#win.ui.ctrl.hotkey">&#x23;</a>
热键控件  

[返回对象:hotkeyObject](#hotkeyObject)

## hotkeyObject 成员列表 <a id="hotkeyObject" href="#hotkeyObject">&#x23;</a>

### hotkeyObject._parentForm <a id="hotkeyObject._parentForm" href="#hotkeyObject._parentForm">&#x23;</a>
返回创建控件的容器窗口（win.form对象），所有窗口控件都拥有此只读属性。  
对于使用窗体设计器创建的窗口，也就是返回设计时窗体容器。  

即使子窗口移除子窗口样式、更改父子关系，或以 orphanWindow显示，  
控件的 _parentForm 始终都不会改变  

[返回对象:winform](https://www.aardio.com/zh-cn/docs/library-reference/win/ui/_.html#winform)

### hotkeyObject.bottom <a id="hotkeyObject.bottom" href="#hotkeyObject.bottom">&#x23;</a>
底部坐标

### hotkeyObject.capture <a id="hotkeyObject.capture" href="#hotkeyObject.capture">&#x23;</a>
是否捕获全局鼠标消息

### hotkeyObject.className <a id="hotkeyObject.className" href="#hotkeyObject.className">&#x23;</a>
运行时类名

### hotkeyObject.clientRect <a id="hotkeyObject.clientRect" href="#hotkeyObject.clientRect">&#x23;</a>
获取控件客户区块位置(::RECT结构体)

### hotkeyObject.close() <a id="hotkeyObject.close" href="#hotkeyObject.close">&#x23;</a>
关闭控件窗口

### hotkeyObject.cls <a id="hotkeyObject.cls" href="#hotkeyObject.cls">&#x23;</a>
设计时类名

### hotkeyObject.disabled <a id="hotkeyObject.disabled" href="#hotkeyObject.disabled">&#x23;</a>
是否禁用

### hotkeyObject.getClientRect() <a id="hotkeyObject.getClientRect" href="#hotkeyObject.getClientRect">&#x23;</a>
控件客户区块位置(::RECT结构体)  

[返回对象:rectObject](https://www.aardio.com/zh-cn/docs/library-reference/global/_.html#rectObject)

### hotkeyObject.getFont() <a id="hotkeyObject.getFont" href="#hotkeyObject.getFont">&#x23;</a>
控件字体(::LOGFONT结构体)  

[返回对象:logfontObject](#logfontObject)

### hotkeyObject.getParent() <a id="hotkeyObject.getParent" href="#hotkeyObject.getParent">&#x23;</a>
返回父窗口  

[返回对象:staticObject](https://www.aardio.com/zh-cn/docs/library-reference/win/ui/ctrl/static.html#staticObject)

### hotkeyObject.getPos() <a id="hotkeyObject.getPos" href="#hotkeyObject.getPos">&#x23;</a>
返回相对坐标,宽,高  
x,y,cx,cy=win.getPos(hwnd)

### hotkeyObject.getRect() <a id="hotkeyObject.getRect" href="#hotkeyObject.getRect">&#x23;</a>
控件区块位置(::RECT结构体)

### hotkeyObject.getRect(true) <a id="hotkeyObject.getRect" href="#hotkeyObject.getRect">&#x23;</a>
控件屏幕区块位置(::RECT结构体)

### hotkeyObject.height <a id="hotkeyObject.height" href="#hotkeyObject.height">&#x23;</a>
高度

### hotkeyObject.hwnd <a id="hotkeyObject.hwnd" href="#hotkeyObject.hwnd">&#x23;</a>
控件句柄

### hotkeyObject.id <a id="hotkeyObject.id" href="#hotkeyObject.id">&#x23;</a>
控件ID

### hotkeyObject.invalidate(/*可选使用::RECT()对象指定客户区*/) <a id="hotkeyObject.invalidate(/*可选使用::RECT" href="#hotkeyObject.invalidate(/*可选使用::RECT">&#x23;</a>
使窗口绘图区无效

### hotkeyObject.invalidate(/*可选使用::RECT()对象指定客户区*/,0) <a id="hotkeyObject.invalidate(/*可选使用::RECT" href="#hotkeyObject.invalidate(/*可选使用::RECT">&#x23;</a>
使窗口绘图区无效  
不刷新背景

### hotkeyObject.left <a id="hotkeyObject.left" href="#hotkeyObject.left">&#x23;</a>
左侧坐标

### hotkeyObject.modifyStyle(remove,add,swpFlags) <a id="hotkeyObject.modifyStyle" href="#hotkeyObject.modifyStyle">&#x23;</a>
修改窗口样式,所有参数都是可选参数,  
@remove 用数值指定要移除的样式,可使用 _WS_ 前缀的常量  
@add 用数值指定要添加的样式,可使用 _WS_ 前缀的常量  
@swpFlags 可选用数值指定调整窗口选项,可使用 _SWP_ 前缀的常量  
如果指定了 @swpFlag ,则使用该参数调用::SetWindowPos  
细节请参考 win.modifyStyle 函数源码

### hotkeyObject.modifyStyleEx(remove,add,swpFlags) <a id="hotkeyObject.modifyStyleEx" href="#hotkeyObject.modifyStyleEx">&#x23;</a>
修改窗口扩展样式,所有参数都是可选参数,  
@remove 用数值指定要移除的样式,可使用 _WS_EX_ 前缀的常量  
@add 用数值指定要添加的样式,可使用 _WS_EX_ 前缀的常量  
@swpFlags 可选用数值指定调整窗口选项,可使用 _SWP_ 前缀的常量  
如果指定了 @swpFlag ,则使用该参数调用::SetWindowPos  
细节请参考 win.modifyStyle 函数源码

### hotkeyObject.postMessage(msg,wParam,lParam) <a id="hotkeyObject.postMessage" href="#hotkeyObject.postMessage">&#x23;</a>
投递窗口消息到消息队列中  
此函数用法请参考 ::User32.PostMessage

### hotkeyObject.redraw() <a id="hotkeyObject.redraw" href="#hotkeyObject.redraw">&#x23;</a>
刷新

### hotkeyObject.reghotkey <a id="hotkeyObject.reghotkey" href="#hotkeyObject.reghotkey">&#x23;</a>

```aardio
hotkeyObject.reghotkey(  
	function(id,mod,vk){   
		/*输入响应热键的执行代码*/  
	}  
)
```

### hotkeyObject.right <a id="hotkeyObject.right" href="#hotkeyObject.right">&#x23;</a>
右侧坐标

### hotkeyObject.sendMessage(msg,wParam,lParam) <a id="hotkeyObject.sendMessage" href="#hotkeyObject.sendMessage">&#x23;</a>
发送窗口消息  
此函数用法请参考 ::User32.SendMessage

### hotkeyObject.setFocus() <a id="hotkeyObject.setFocus" href="#hotkeyObject.setFocus">&#x23;</a>
设置焦点

### hotkeyObject.setFont(指定字体) <a id="hotkeyObject.setFont" href="#hotkeyObject.setFont">&#x23;</a>
指定LOGFONT字体对象,或逻辑字体句柄

### hotkeyObject.setFont(混入字体属性) <a id="hotkeyObject.setFont" href="#hotkeyObject.setFont">&#x23;</a>

```aardio
hotkeyObject.setFont(point=10;name="宋体");
```

### hotkeyObject.setParent(控件对象) <a id="hotkeyObject.setParent" href="#hotkeyObject.setParent">&#x23;</a>
改变父窗口

### hotkeyObject.setPos(x坐标,y坐标,宽,高,插入位置,参数) <a id="hotkeyObject.setPos" href="#hotkeyObject.setPos">&#x23;</a>
调整窗口位置或排序,所有参数可选  
同时指定x,y坐标则移动位置  
同时指定宽高则改变大小  
指定插入位置(句柄或_HWND前缀常量)则调整Z序

### hotkeyObject.setRect(rc) <a id="hotkeyObject.setRect" href="#hotkeyObject.setRect">&#x23;</a>
设置控件区块位置(::RECT结构体)

### hotkeyObject.setRect(rc,true) <a id="hotkeyObject.setRect" href="#hotkeyObject.setRect">&#x23;</a>
设置控件屏幕区块位置(::RECT结构体)

### hotkeyObject.show(true) <a id="hotkeyObject.show" href="#hotkeyObject.show">&#x23;</a>
显示控件

### hotkeyObject.text <a id="hotkeyObject.text" href="#hotkeyObject.text">&#x23;</a>
表示控件热键的文本，  
使用此属性前必须导入标准库 key 。  

注意 Ctrl,Alt,Shift 必须大写首字母小写其他字母，  
键与键之间用 + 号分隔，忽略空格。  
无热键用空字符串表示。

### hotkeyObject.theme <a id="hotkeyObject.theme" href="#hotkeyObject.theme">&#x23;</a>
外观主题,例如  
winform.button.theme = "Explorer"  
winform.button.theme = false

### hotkeyObject.top <a id="hotkeyObject.top" href="#hotkeyObject.top">&#x23;</a>
顶部坐标

### hotkeyObject.update() <a id="hotkeyObject.update" href="#hotkeyObject.update">&#x23;</a>
重绘invalidate函数指定的区块

### hotkeyObject.value <a id="hotkeyObject.value" href="#hotkeyObject.value">&#x23;</a>
用于获取或设置设置，值为表示热键的数组。  
数组第 1 个成员为表示控制键的代码,  
例如 _MOD_CONTROL,_MOD_ALT,_MOD_SHIFT 等。  
数组第 2 个成员为其他按键的虚拟键码

### hotkeyObject.visible <a id="hotkeyObject.visible" href="#hotkeyObject.visible">&#x23;</a>
当前控件窗口是否显示。  
仅检查当前窗口的可见性样式（窗口 是否具有 _WS_VISIBLE 样式）。  
不考虑父窗口是否可见，不考虑是否被其他窗口遮挡。  
如果需要同时判断父窗口的可见性，应改用 win.isVisible 函数。

### hotkeyObject.width <a id="hotkeyObject.width" href="#hotkeyObject.width">&#x23;</a>
宽度
