Solved

form stay on top

Posted on 2000-04-30
2
291 Views
Last Modified: 2010-05-02
in vb how can I make my form to always stay on top of the other windows?
0
Comment
Question by:Mikemay
2 Comments
 
LVL 1

Accepted Solution

by:
SpyMaster earned 200 total points
ID: 2764881
Here, try this code to make your windows to 'Always on top'.


---module---
Public 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

---put this on your form---
Private Sub Form_Load()
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, &H3
End Sub

0
 

Author Comment

by:Mikemay
ID: 2764889
it worked!!!! boy that was fast... thanks!!!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question