home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / message / msgboxmw / msgbox.bas < prev    next >
Encoding:
BASIC Source File  |  1995-02-09  |  1.4 KB  |  38 lines

  1. Option Explicit
  2.  
  3. 'API declarations
  4. Declare Function WinHelp% Lib "User" (ByVal hWnd%, ByVal lpHelpFile$, ByVal wCommand%, dwData As Any)
  5. Declare Function SendMessageBynum& Lib "User" Alias "SendMessage" (ByVal hWnd%, ByVal wMsg%, ByVal wParam%, ByVal lParam&)
  6. Declare Function SendMessageBystring& Lib "User" Alias "SendMessage" (ByVal hWnd%, ByVal wMsg%, ByVal wParam%, ByVal lParam$)
  7.  
  8.  
  9. 'global variables
  10. Global MBD_BtnReturned As Integer   'value returned by MsgBox function call
  11.  
  12. 'global constants
  13. Global Const IDOK = 1      'OK button selected.
  14. Global Const IDCANCEL = 2  'Cancel button selected.
  15. Global Const IDABORT = 3   'Abort button selected.
  16. Global Const IDRETRY = 4   'Retry button selected.
  17. Global Const IDIGNORE = 5  'Ignore button selected.
  18. Global Const IDYES = 6     'Yes button selected.
  19. Global Const IDNO = 7      'No button selected.
  20.  
  21. Global Const MODAL = 1     'window display state
  22.  
  23. Global Const HELP_QUIT = &H2        ' Terminate help
  24. Global Const HELP_INDEX = &H3       ' Display help index
  25.  
  26. 'edit control message constants
  27. Global Const WM_USER = &H400
  28. Global Const EM_GETLINECOUNT = WM_USER + 10
  29. Global Const EM_LINEINDEX = WM_USER + 11
  30. Global Const EM_LINELENGTH = WM_USER + 17
  31. Global Const EM_GETLINE = WM_USER + 20
  32.  
  33. Sub Center_Form (vbf As Form)
  34. 'center form (vbf) on screen
  35. vbf.Move (screen.Width - vbf.Width) \ 2, (screen.Height - vbf.Height) \ 2
  36. End Sub
  37.  
  38.