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 >
BASIC Source File  |  1993-06-12  |  656b  |  22 lines

  1. DefInt A-Z
  2.  
  3. Declare Function GetSystemMenu Lib "User" (ByVal hwnd, ByVal bRevert)
  4. Declare Function RemoveMenu Lib "User" (ByVal hMenu, ByVal nPosition, ByVal wFlags)
  5.  
  6. Const MF_BYPOSITION = &H400
  7.  
  8. Sub DialogBox (Frm As Form)
  9.  
  10.     ' Obtain the handle to the forms System menu
  11.     '
  12.     HSysMenu = GetSystemMenu(Frm.hwnd, 0)
  13.   
  14.     ' Remove all but the MOVE and CLOSE options.  The menu items
  15.     ' must be removed starting with the last menu item.
  16.     '
  17.     R = RemoveMenu(HSysMenu, 8, MF_BYPOSITION) 'Switch to
  18.     R = RemoveMenu(HSysMenu, 7, MF_BYPOSITION) 'Separator
  19.     R = RemoveMenu(HSysMenu, 5, MF_BYPOSITION) 'Separator
  20. End Sub
  21.  
  22.