Skip to content

Commit

Permalink
Get/Set isTopmost
Browse files Browse the repository at this point in the history
  • Loading branch information
sancarn committed Jun 13, 2022
1 parent 45f2e55 commit 835bf4b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,5 @@ Before `08/07/2021` a change log was not kept. We have retrospectively gone bac
* 2022-06-12 stdWindow BREAKING - Added `AwaitForWindow` function.
* 2022-06-13 stdAcc FIX - Fix `stdAcc::CreateFromMouse()` on 64-bit
* 2022-06-13 stdAcc FIX - Fix incorrect parameter order for `stdAcc` helper method `PointToLongLong()`. Without the fix, incorrect elements were being selected by their location.
* 2022-06-13 stdAcc FIX - Fix Added check that acc is desktop to `getPath()`.
* 2022-06-13 stdAcc FIX - Fix Added check that acc is desktop to `getPath()`.
* 2022-06-13 stdWindow FEATURE - Added `Get/Let isTopMost`, useful for userforms.
12 changes: 12 additions & 0 deletions src/stdWindow.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,18 @@ Public Property Let Resizable(ByVal v As Boolean)
End If
End Property

'Get/Set topmost
Public Property Get isTopmost() as Boolean
const WS_EX_TOPMOST = &H8
isTopMost = (StyleEx And WS_EX_TOPMOST) = WS_EX_TOPMOST
End Property
Public Property Let isTopmost(ByVal v as boolean)
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Call SetWindowPos(pHandle, iif(v, HWND_TOPMOST, HWND_NOTOPMOST), 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE)
End Property

'================================================================================================
'= PUBLIC INSTANCE METHODS
Expand Down

0 comments on commit 835bf4b

Please sign in to comment.