jlsmithhartfiel
Programmer
I have a program that creates msn-like alerts on certain conditions. So a little form pops up in the lower-right hand corner. The problem is, if I'm typing in another app, the popups are taking focus.
I tried to use the setwindowpos and flag swp_noactivate, but it's not working. Is there another way?
TIA,
Jessica![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)
I tried to use the setwindowpos and flag swp_noactivate, but it's not working. Is there another way?
Code:
Public Function SetOnTop(ByVal hwnd As Long, ByVal blnSetOnTop As Boolean)
If blnSetOnTop Then
SetOnTop = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOACTIVATE Or SWP_NOSIZE)
Else
SetOnTop = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOACTIVATE Or SWP_NOSIZE)
End If
End Function
TIA,
Jessica
![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)