The following code should help:
Public Const SWP_NOMOVE = 2
Public Const SWP_NOSIZE = 1
Public Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Public Const SWP_NOACTIVATE = &H10
Public Const SWP_SHOWWINDOW = &H40
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Declare Sub 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)
Private Sub Form_Activate()
'SETS THE FORM IDENTIFIED AS ME IN THE STATEMENT BELOW TO BE ALWAYS ON TOP
WHEN SET TO "TRUE"
SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or
SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
End Sub
"Jim M M" <Pe*********@SPAMKILLERYahoo.com> wrote in message
news:TQ********************@vel.net...
Hello Everyone,
QUESTION #1
I am working on a timer. I have the following code which works kind of
OK.
If Form1.WindowState = 1 Then Form1.WindowState = 0
The problem is that if the user has another window open when my timer
program restores itself it ends up behind whatever window is currently
open. Is there any way for my window to be told to be on top?
QUESTION #2
The other question, is there a way to change the image or text on the
taskbar icon as to draw attention to it?
Thanks In Advance For Any Answers.
Jim Mac Millan
San Dimas, CA