Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

Makeing a form always on top.

I want to have a form that is always ontop... like icq or winamp. how do i do this
0
hess
Asked:
hess
1 Solution
 
MikeP090797Commented:
Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (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

SetWindowPos frmTools.hwnd, -1, 0, 0, 0, 0, 3
0
 
hessAuthor Commented:
where do i put this code
0
 
hessAuthor Commented:
where do i put this code
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
viktornetCommented:
How about this ???

SetForegroundWindow(Me.hWnd) 'API call...find it in the help file...

Maybe try putting it in a Timer's OnTimer() event...
0
 
janeaustenCommented:
Hess,

put it in your Form_Load, like so

Private Sub Form_Load()
    'sets form to be always on top
    'SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE
   
End Sub


hope this helps
0
 
hessAuthor Commented:
got it thanx
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Tackle projects and never again get stuck behind a technical roadblock.
Join Now