|
-
Nov 16th, 2000, 07:14 PM
#1
Thread Starter
Hyperactive Member
Is it possible to make a certain menu appear when you click on the icon on a windows standard headerbar (like where those Move and Close commands are located)?
-JR-
-
Nov 16th, 2000, 09:35 PM
#2
Fanatic Member
this will add new menu choice to the system menu:
Code:
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As Long
Const MF_CHECKED = &H8&
Const MF_APPEND = &H100&
Const MF_DISABLED = &H2&
Const MF_GRAYED = &H1&
Const MF_SEPARATOR = &H800&
Const MF_STRING = &H0&
Private Sub Form_Load()
Dim hSysMenu As Long, nCnt As Long
' Get handle to our form's system menu
' (Restore, Maximize, Move, close etc.)
hSysMenu = GetSystemMenu(Me.hwnd, False)
If hSysMenu Then
AppendMenu hSysMenu, MF_SEPARATOR, ByVal 0&, "-"
AppendMenu hSysMenu, MF_STRING, ByVal 0&, "Hello !"
DrawMenuBar Me.hwnd
' Force caption bar's refresh. Disabling X button
End If
End Sub
Don't know if it's what you want
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Nov 16th, 2000, 09:37 PM
#3
Thread Starter
Hyperactive Member
Seems to be, thanks,
-JR-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|