S
SamSpade
Below is what I did in VB6 to set a form to be on top.
It nolonger works.
Questions:
Is there a reason to expect it to not work because of the new VS?
Is there a reason to expect it to not work in XP?
Is there an approach that does work?
THANKS
Public Shared Sub AlwaysOnTop(ByVal aHwnd As System.IntPtr, ByVal OnTop As
Boolean)
Const HWND_TOPMOST As Integer = -1
Const HWND_NOTOPMOST As Integer = -2
Dim hwndInsertAfter As Integer
hwndInsertAfter = VB.IIf(OnTop, HWND_TOPMOST, HWND_NOTOPMOST)
Win32.User.SetWindowPos(aHwnd, hwndInsertAfter, 0, 0, 0, 0,
Win32.User.SWP_NOMOVE Or Win32.User.SWP_NOSIZE)
End Sub
It nolonger works.
Questions:
Is there a reason to expect it to not work because of the new VS?
Is there a reason to expect it to not work in XP?
Is there an approach that does work?
THANKS
Public Shared Sub AlwaysOnTop(ByVal aHwnd As System.IntPtr, ByVal OnTop As
Boolean)
Const HWND_TOPMOST As Integer = -1
Const HWND_NOTOPMOST As Integer = -2
Dim hwndInsertAfter As Integer
hwndInsertAfter = VB.IIf(OnTop, HWND_TOPMOST, HWND_NOTOPMOST)
Win32.User.SetWindowPos(aHwnd, hwndInsertAfter, 0, 0, 0, 0,
Win32.User.SWP_NOMOVE Or Win32.User.SWP_NOSIZE)
End Sub