Always on top? 
Author Message
 Always on top?

Does anyone know how to make a VB app always stay on top?  Some programs
I run have an "always on top" option, and I was wondering how I can do
this in a VB program to give the user this option.  Thanks!

Jason

--
Get up to the minute news at Gigglebyte News:
http://www.*-*-*.com/



Mon, 08 Jan 2001 03:00:00 GMT  
 Always on top?
Jason ,

    I have seen some API code recently on these Newsgroups to do what you
want. You should be able to find it if you search for "on top". API
programming scares me - so I use the FastForm ActiveX Control, availiable at
http://www.bigfoot.com/~ctsoftware to do this for me as it does not require
any programming at all.

Regards
    Molly.

Quote:

>Does anyone know how to make a VB app always stay on top?  Some programs
>I run have an "always on top" option, and I was wondering how I can do
>this in a VB program to give the user this option.  Thanks!

>Jason

>--
>Get up to the minute news at Gigglebyte News:
>http://www.gigglebyte.com/news



Mon, 08 Jan 2001 03:00:00 GMT  
 Always on top?
Molly,

There is something wrong with the URL you provided, could you please repost+ACE-

+AD4-Jason ,
+AD4-
+AD4-    I have seen some API code recently on these Newsgroups to do what you
+AD4-want. You should be able to find it if you search for +ACI-on top+ACI-. API
+AD4-programming scares me - so I use the FastForm ActiveX Control, availiable
at
+AD4-http://www.bigfoot.com/+AH4-ctsoftware to do this for me as it does not require
+AD4-any programming at all.
+AD4-
+AD4-Regards
+AD4-    Molly.
+AD4-
+AD4APg-Does anyone know how to make a VB app always stay on top?  Some programs
+AD4APg-I run have an +ACI-always on top+ACI- option, and I was wondering how I can do
+AD4APg-this in a VB program to give the user this option.  Thanks+ACE-
+AD4APg-
+AD4APg-Jason
+AD4APg-
+AD4APg-
+AD4APg-
+AD4APg---
+AD4APg-Get up to the minute news at Gigglebyte News:
+AD4APg-http://www.gigglebyte.com/news
+AD4-
+AD4-



Mon, 08 Jan 2001 03:00:00 GMT  
 Always on top?
Here is a reply I just got from Steve Kennedy in the vb.winapi newsgroup, to
a similar question:

I've been using this code myself in several of my projects. It uses the
SetWindowPos API. By creating a public subroutine (MakeTopWindow), any form
could be made a topmost window. This 'top most' form, however, may get in
the way of MS Word dialog boxes or system dialog boxes.

Hope this helps...

-Steve
____________________________________________________

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 wFlags As Long) As Long

Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOSIZE = &H1

Public Sub MakeTopWindow(theForm As Form, Optional OnTop As Boolean = True)
  Dim lResult As Long
  Dim lPosition As Long

  ' OnTop is optional parameter -- default to true if missing

  If OnTop = True Then
    lPosition = HWND_TOPMOST
  Else
    lPosition = HWND_NOTOPMOST
  End If

  lResult = SetWindowPos(theForm.hwnd, lPosition, _
    0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
End Sub

Quote:

>Does anyone know how to make a VB app always stay on top?  Some programs
>I run have an "always on top" option, and I was wondering how I can do
>this in a VB program to give the user this option.  Thanks!

>Jason



Tue, 09 Jan 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Always on top (ALWAYS)

2. Make a form always on top - always

3. Make a window always on top (of every window..always)

4. Keeping a Form Always On Top

5. VBA Form Always On Top

6. MsgBox Always On-Top

7. Always on TOP Property

8. Always on top application

9. Windows ALWAYS on top ...

10. Always on top

11. Form always on top

12. Form always on top

 

 
Powered by phpBB® Forum Software