VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Keeps the form on top of ALL windows open on the computer.

by Deano Splamoni (15 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 7th May 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Keeps the form on top of ALL windows open on the computer.

API Declarations


Public Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
Public Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Public Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
Public Const MF_BYPOSITION = &H400&
Public Const MF_DISABLED = &H2&


Rate Keeps the form on top of ALL windows open on the computer.



Dim hMenu As Long
Dim nCount As Long
  hMenu = GetSystemMenu(Frm.hwnd, 0)
  nCount = GetMenuItemCount(hMenu)
  Call RemoveMenu(hMenu, nCount - 1, MF_DISABLED Or MF_BYPOSITION)
  DrawMenuBar Frm.hwnd
End Sub

Private Sub form_load()
DisableX Me
End Sub

'wanna join antbyte software - email me at '[email protected]'
'evry1's accepted to out vb6 software creation team

Download this snippet    Add to My Saved Code

Keeps the form on top of ALL windows open on the computer. Comments

No comments have been posted about Keeps the form on top of ALL windows open on the computer.. Why not be the first to post a comment about Keeps the form on top of ALL windows open on the computer..

Post your comment

Subject:
Message:
0/1000 characters