home *** CD-ROM | disk | FTP | other *** search
/ MORE WinGames / WINGAMES.iso / winjig / aboutbox.txt < prev    next >
Text File  |  1991-05-30  |  1KB  |  43 lines

  1. DefInt A-Z
  2.  
  3. Declare Function GetWinFlags Lib "Kernel" () As Long
  4. Declare Function GetFreeSpace Lib "Kernel" (ByVal wFlags) As Long
  5.  
  6. Const WF_STANDARD = &H10
  7. Const WF_ENHANCED = &H20
  8. Const WF_80x87 = &H400
  9.  
  10. Sub Form_Load ()
  11. Dim WinFlags As Long
  12. Dim Mode As String, Processor As String
  13.  
  14.     ' Dialog Boxes should only have Move and Close items
  15.     ' in their System menus', so remove the others.
  16.     '
  17.     Remove_Items_From_Sysmenu AboutBox
  18.  
  19.     ' Center the AboutBox on the screen
  20.     '
  21.      Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
  22.  
  23.     ' Get current Windows configuration
  24.     '
  25.     WinFlags = GetWinFlags()
  26.  
  27.     ' Display configuration values in Lbl_Info.Caption and Lbl_InfoValues.Caption
  28.     ' (NOTE: CRLF variable causes a line break in a labels caption)
  29.     '
  30.     If WinFlags And WF_ENHANCED Then Mode = "386 Enhanced Mode" Else Mode = "Standard Mode"
  31.     Lbl_Info.Caption = Mode + Chr$(13) + Chr$(10) + "Free Memory:" + Chr$(13) + Chr$(10) + "Math Co-processor:"
  32.     If WinFlags And WF_80x87 Then Processor = "Present" Else Processor = "None"
  33.     Lbl_InfoValues.Caption = Chr$(13) + Chr$(10) + Format$(GetFreeSpace(0) \ 1024) + " KB" + Chr$(13) + Chr$(10) + Processor
  34.  
  35. End Sub
  36.  
  37. Sub Cmd_OK_Click ()
  38.  
  39.     Unload AboutBox
  40.  
  41. End Sub
  42.  
  43.