Regards
Option Explicit
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 uFlags As Long) As Long
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Sub AlwaysOnTop()
Dim hwnd As Long
Dim res As Long
hwnd = FindWindow("XLMAIN", vbNullString)
res = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, vbNull)
End Sub
Sub NotAlwaysOnTop()
Dim hwnd As Long
Dim res As Long
hwnd = FindWindow("XLMAIN", vbNullString)
res = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, vbNull)
End Sub
========
I also looked at http://www.shareware.com and searched for "always on top".
There were quite a few hits including this one:
http://www.simtel.net/pub/pd/57690.html
========
This was actually more irritating than I would have imagined! I could
resize/minimize, but if you like this kind of thing,....
--
Dave Peterson
ec3...@msn.com
Dave Peterson <ec3...@msn.com> wrote in message news:<3D3DD50A...@msn.com>...