- 积分
- 24557
- 明经币
- 个
- 注册时间
- 2004-3-17
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-6-20 14:33:00
|
显示全部楼层
- Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
- Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
- Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
- Const GWL_STYLE = (-16)
- Const WS_CAPTION = &HC00000
- Const SWP_FRAMECHANGED = &H20
- Const SWP_NOMOVE = &H2
- Const SWP_NOSIZE = &H1
- Const HWND_TOP = 0
- Private hasTitleBar As Boolean
- Public Sub TitleBarChange()
- Dim L As Long
- L = GetWindowLong(Application.hwnd, GWL_STYLE)
- If hasTitleBar Then
- L = L Or WS_CAPTION
- Else
- L = L And Not (WS_CAPTION)
- End If
- L = SetWindowLong(Application.hwnd, GWL_STYLE, L)
- hasTitleBar = Not hasTitleBar
- SetWindowPos Application.hwnd, HWND_TOP, 0, 0, 0, 0, SWP_FRAMECHANGED Or SWP_NOMOVE Or SWP_NOSIZE
- End Sub
上述代码放在ThisDrawing内将下列代码加入到AcadDoc200?.lsp文件内(defun c:tbc() (command "-vbarun" "TitleBarChange")) |
|