home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Mother of All Windows Books
/
CD-MOM.iso
/
cd_mom
/
newsletr
/
vbz
/
vbz1-3
/
dlgbox.bas
< prev
next >
Wrap
BASIC Source File
|
1993-06-12
|
656b
|
22 lines
DefInt A-Z
Declare Function GetSystemMenu Lib "User" (ByVal hwnd, ByVal bRevert)
Declare Function RemoveMenu Lib "User" (ByVal hMenu, ByVal nPosition, ByVal wFlags)
Const MF_BYPOSITION = &H400
Sub DialogBox (Frm As Form)
' Obtain the handle to the forms System menu
'
HSysMenu = GetSystemMenu(Frm.hwnd, 0)
' Remove all but the MOVE and CLOSE options. The menu items
' must be removed starting with the last menu item.
'
R = RemoveMenu(HSysMenu, 8, MF_BYPOSITION) 'Switch to
R = RemoveMenu(HSysMenu, 7, MF_BYPOSITION) 'Separator
R = RemoveMenu(HSysMenu, 5, MF_BYPOSITION) 'Separator
End Sub