home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / aboutm / frmabout.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-09-11  |  19.5 KB  |  541 lines

  1. VERSION 2.00
  2. Begin Form frmAboutMagic 
  3.    BackColor       =   &H00FFFFFF&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "About Magic Version 1.0"
  6.    ClientHeight    =   6405
  7.    ClientLeft      =   1920
  8.    ClientTop       =   2595
  9.    ClientWidth     =   9390
  10.    Height          =   6810
  11.    Icon            =   FRMABOUT.FRX:0000
  12.    Left            =   1860
  13.    LinkTopic       =   "Form2"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   6405
  17.    ScaleWidth      =   9390
  18.    Top             =   2250
  19.    Width           =   9510
  20.    Begin Timer tmrAboutMagic 
  21.       Interval        =   1000
  22.       Left            =   8070
  23.       Top             =   780
  24.    End
  25.    Begin Frame fraAboutMagic 
  26.       Caption         =   "Drive Information"
  27.       Height          =   1965
  28.       Index           =   2
  29.       Left            =   810
  30.       TabIndex        =   5
  31.       Top             =   4230
  32.       Width           =   8325
  33.       Begin ListBox lstDriveInfo 
  34.          Height          =   1395
  35.          Left            =   210
  36.          TabIndex        =   20
  37.          Top             =   390
  38.          Width           =   7935
  39.       End
  40.    End
  41.    Begin Frame fraAboutMagic 
  42.       Caption         =   "Computer Information"
  43.       Height          =   2625
  44.       Index           =   1
  45.       Left            =   5490
  46.       TabIndex        =   4
  47.       Top             =   1500
  48.       Width           =   3645
  49.       Begin Label lblAboutmagicReturn 
  50.          Height          =   255
  51.          Index           =   14
  52.          Left            =   1920
  53.          TabIndex        =   28
  54.          Top             =   2310
  55.          Width           =   1485
  56.       End
  57.       Begin Label lblAboutMagicComputerInfo 
  58.          Alignment       =   1  'Right Justify
  59.          Caption         =   "Free Memory:"
  60.          FontBold        =   0   'False
  61.          FontItalic      =   0   'False
  62.          FontName        =   "MS Sans Serif"
  63.          FontSize        =   8.25
  64.          FontStrikethru  =   0   'False
  65.          FontUnderline   =   0   'False
  66.          Height          =   255
  67.          Index           =   7
  68.          Left            =   210
  69.          TabIndex        =   29
  70.          Top             =   2310
  71.          Width           =   1650
  72.       End
  73.       Begin Label lblAboutmagicReturn 
  74.          Height          =   255
  75.          Index           =   13
  76.          Left            =   1920
  77.          TabIndex        =   30
  78.          Top             =   2040
  79.          Width           =   1485
  80.       End
  81.       Begin Label lblAboutmagicReturn 
  82.          Height          =   255
  83.          Index           =   12
  84.          Left            =   1920
  85.          TabIndex        =   31
  86.          Top             =   1770
  87.          Width           =   1485
  88.       End
  89.       Begin Label lblAboutmagicReturn 
  90.          Height          =   255
  91.          Index           =   11
  92.          Left            =   1920
  93.          TabIndex        =   32
  94.          Top             =   1500
  95.          Width           =   1485
  96.       End
  97.       Begin Label lblAboutmagicReturn 
  98.          Height          =   255
  99.          Index           =   10
  100.          Left            =   1920
  101.          TabIndex        =   33
  102.          Top             =   1200
  103.          Width           =   1485
  104.       End
  105.       Begin Label lblAboutmagicReturn 
  106.          Height          =   255
  107.          Index           =   9
  108.          Left            =   1920
  109.          TabIndex        =   34
  110.          Top             =   930
  111.          Width           =   1485
  112.       End
  113.       Begin Label lblAboutmagicReturn 
  114.          Height          =   255
  115.          Index           =   8
  116.          Left            =   1920
  117.          TabIndex        =   35
  118.          Top             =   630
  119.          Width           =   1485
  120.       End
  121.       Begin Label lblAboutmagicReturn 
  122.          Height          =   255
  123.          Index           =   7
  124.          Left            =   1920
  125.          TabIndex        =   36
  126.          Top             =   330
  127.          Width           =   1485
  128.       End
  129.       Begin Label lblAboutMagicComputerInfo 
  130.          Alignment       =   1  'Right Justify
  131.          Caption         =   "Math Co-Processor:"
  132.          FontBold        =   0   'False
  133.          FontItalic      =   0   'False
  134.          FontName        =   "MS Sans Serif"
  135.          FontSize        =   8.25
  136.          FontStrikethru  =   0   'False
  137.          FontUnderline   =   0   'False
  138.          Height          =   255
  139.          Index           =   6
  140.          Left            =   210
  141.          TabIndex        =   27
  142.          Top             =   2040
  143.          Width           =   1650
  144.       End
  145.       Begin Label lblAboutMagicComputerInfo 
  146.          Alignment       =   1  'Right Justify
  147.          Caption         =   "Temporary Drive:"
  148.          FontBold        =   0   'False
  149.          FontItalic      =   0   'False
  150.          FontName        =   "MS Sans Serif"
  151.          FontSize        =   8.25
  152.          FontStrikethru  =   0   'False
  153.          FontUnderline   =   0   'False
  154.          Height          =   255
  155.          Index           =   5
  156.          Left            =   210
  157.          TabIndex        =   26
  158.          Top             =   1770
  159.          Width           =   1650
  160.       End
  161.       Begin Label lblAboutMagicComputerInfo 
  162.          Alignment       =   1  'Right Justify
  163.          Caption         =   "Next Available Drive:"
  164.          FontBold        =   0   'False
  165.          FontItalic      =   0   'False
  166.          FontName        =   "MS Sans Serif"
  167.          FontSize        =   8.25
  168.          FontStrikethru  =   0   'False
  169.          FontUnderline   =   0   'False
  170.          Height          =   255
  171.          Index           =   4
  172.          Left            =   210
  173.          TabIndex        =   25
  174.          Top             =   1500
  175.          Width           =   1650
  176.       End
  177.       Begin Label lblAboutMagicComputerInfo 
  178.          Alignment       =   1  'Right Justify
  179.          AutoSize        =   -1  'True
  180.          Caption         =   "Free System Resources:"
  181.          FontBold        =   0   'False
  182.          FontItalic      =   0   'False
  183.          FontName        =   "MS Sans Serif"
  184.          FontSize        =   8.25
  185.          FontStrikethru  =   0   'False
  186.          FontUnderline   =   0   'False
  187.          Height          =   195
  188.          Index           =   3
  189.          Left            =   90
  190.          TabIndex        =   24
  191.          Top             =   1200
  192.          Width           =   1770
  193.       End
  194.       Begin Label lblAboutMagicComputerInfo 
  195.          Alignment       =   1  'Right Justify
  196.          AutoSize        =   -1  'True
  197.          Caption         =   "Free USER Resources:"
  198.          FontBold        =   0   'False
  199.          FontItalic      =   0   'False
  200.          FontName        =   "MS Sans Serif"
  201.          FontSize        =   8.25
  202.          FontStrikethru  =   0   'False
  203.          FontUnderline   =   0   'False
  204.          Height          =   195
  205.          Index           =   2
  206.          Left            =   195
  207.          TabIndex        =   23
  208.          Top             =   900
  209.          Width           =   1665
  210.       End
  211.       Begin Label lblAboutMagicComputerInfo 
  212.          Alignment       =   1  'Right Justify
  213.          Caption         =   "Free GDI Resources:"
  214.          FontBold        =   0   'False
  215.          FontItalic      =   0   'False
  216.          FontName        =   "MS Sans Serif"
  217.          FontSize        =   8.25
  218.          FontStrikethru  =   0   'False
  219.          FontUnderline   =   0   'False
  220.          Height          =   255
  221.          Index           =   1
  222.          Left            =   210
  223.          TabIndex        =   22
  224.          Top             =   600
  225.          Width           =   1650
  226.       End
  227.       Begin Label lblAboutMagicComputerInfo 
  228.          Alignment       =   1  'Right Justify
  229.          Caption         =   "CPU Type:"
  230.          FontBold        =   0   'False
  231.          FontItalic      =   0   'False
  232.          FontName        =   "MS Sans Serif"
  233.          FontSize        =   8.25
  234.          FontStrikethru  =   0   'False
  235.          FontUnderline   =   0   'False
  236.          Height          =   255
  237.          Index           =   0
  238.          Left            =   210
  239.          TabIndex        =   21
  240.          Top             =   300
  241.          Width           =   1650
  242.       End
  243.    End
  244.    Begin Frame fraAboutMagic 
  245.       Caption         =   "Windows Information"
  246.       Height          =   2625
  247.       Index           =   0
  248.       Left            =   810
  249.       TabIndex        =   3
  250.       Top             =   1500
  251.       Width           =   4575
  252.       Begin Label lblAboutmagicReturn 
  253.          Height          =   255
  254.          Index           =   6
  255.          Left            =   2250
  256.          TabIndex        =   15
  257.          Top             =   2190
  258.          Width           =   2100
  259.       End
  260.       Begin Label lblAboutmagicReturn 
  261.          Height          =   255
  262.          Index           =   5
  263.          Left            =   2250
  264.          TabIndex        =   19
  265.          Top             =   1890
  266.          Width           =   2100
  267.       End
  268.       Begin Label lblAboutmagicReturn 
  269.          Height          =   255
  270.          Index           =   4
  271.          Left            =   2250
  272.          TabIndex        =   18
  273.          Top             =   1590
  274.          Width           =   2100
  275.       End
  276.       Begin Label lblAboutmagicReturn 
  277.          Height          =   255
  278.          Index           =   3
  279.          Left            =   2250
  280.          TabIndex        =   17
  281.          Top             =   1290
  282.          Width           =   2100
  283.       End
  284.       Begin Label lblAboutmagicReturn 
  285.          Height          =   255
  286.          Index           =   2
  287.          Left            =   2250
  288.          TabIndex        =   16
  289.          Top             =   990
  290.          Width           =   2100
  291.       End
  292.       Begin Label lblAboutmagicReturn 
  293.          Height          =   255
  294.          Index           =   1
  295.          Left            =   2250
  296.          TabIndex        =   14
  297.          Top             =   690
  298.          Width           =   2100
  299.       End
  300.       Begin Label lblAboutmagicReturn 
  301.          Height          =   255
  302.          Index           =   0
  303.          Left            =   2250
  304.          TabIndex        =   13
  305.          Top             =   390
  306.          Width           =   2100
  307.       End
  308.       Begin Label lblWinInfo 
  309.          Alignment       =   1  'Right Justify
  310.          Caption         =   "MS-DOS Version:"
  311.          FontBold        =   0   'False
  312.          FontItalic      =   0   'False
  313.          FontName        =   "MS Sans Serif"
  314.          FontSize        =   8.25
  315.          FontStrikethru  =   0   'False
  316.          FontUnderline   =   0   'False
  317.          Height          =   255
  318.          Index           =   6
  319.          Left            =   210
  320.          TabIndex        =   12
  321.          Top             =   2190
  322.          Width           =   1995
  323.       End
  324.       Begin Label lblWinInfo 
  325.          Alignment       =   1  'Right Justify
  326.          AutoSize        =   -1  'True
  327.          Caption         =   "Windows Up Time:"
  328.          FontBold        =   0   'False
  329.          FontItalic      =   0   'False
  330.          FontName        =   "MS Sans Serif"
  331.          FontSize        =   8.25
  332.          FontStrikethru  =   0   'False
  333.          FontUnderline   =   0   'False
  334.          Height          =   195
  335.          Index           =   5
  336.          Left            =   210
  337.          TabIndex        =   11
  338.          Top             =   1890
  339.          Width           =   1995
  340.       End
  341.       Begin Label lblWinInfo 
  342.          Alignment       =   1  'Right Justify
  343.          AutoSize        =   -1  'True
  344.          Caption         =   "Windows Emulation:"
  345.          FontBold        =   0   'False
  346.          FontItalic      =   0   'False
  347.          FontName        =   "MS Sans Serif"
  348.          FontSize        =   8.25
  349.          FontStrikethru  =   0   'False
  350.          FontUnderline   =   0   'False
  351.          Height          =   195
  352.          Index           =   4
  353.          Left            =   210
  354.          TabIndex        =   10
  355.          Top             =   1590
  356.          Width           =   1995
  357.       End
  358.       Begin Label lblWinInfo 
  359.          Alignment       =   1  'Right Justify
  360.          AutoSize        =   -1  'True
  361.          Caption         =   "Windows Mode:"
  362.          FontBold        =   0   'False
  363.          FontItalic      =   0   'False
  364.          FontName        =   "MS Sans Serif"
  365.          FontSize        =   8.25
  366.          FontStrikethru  =   0   'False
  367.          FontUnderline   =   0   'False
  368.          Height          =   195
  369.          Index           =   3
  370.          Left            =   210
  371.          TabIndex        =   9
  372.          Top             =   1290
  373.          Width           =   1995
  374.       End
  375.       Begin Label lblWinInfo 
  376.          Alignment       =   1  'Right Justify
  377.          AutoSize        =   -1  'True
  378.          Caption         =   "Windows System Directory:"
  379.          FontBold        =   0   'False
  380.          FontItalic      =   0   'False
  381.          FontName        =   "MS Sans Serif"
  382.          FontSize        =   8.25
  383.          FontStrikethru  =   0   'False
  384.          FontUnderline   =   0   'False
  385.          Height          =   195
  386.          Index           =   2
  387.          Left            =   210
  388.          TabIndex        =   8
  389.          Top             =   990
  390.          Width           =   1995
  391.       End
  392.       Begin Label lblWinInfo 
  393.          Alignment       =   1  'Right Justify
  394.          AutoSize        =   -1  'True
  395.          Caption         =   "Windows Directory:"
  396.          FontBold        =   0   'False
  397.          FontItalic      =   0   'False
  398.          FontName        =   "MS Sans Serif"
  399.          FontSize        =   8.25
  400.          FontStrikethru  =   0   'False
  401.          FontUnderline   =   0   'False
  402.          Height          =   195
  403.          Index           =   1
  404.          Left            =   210
  405.          TabIndex        =   7
  406.          Top             =   690
  407.          Width           =   1995
  408.       End
  409.       Begin Label lblWinInfo 
  410.          Alignment       =   1  'Right Justify
  411.          AutoSize        =   -1  'True
  412.          Caption         =   "Windows Version:"
  413.          FontBold        =   0   'False
  414.          FontItalic      =   0   'False
  415.          FontName        =   "MS Sans Serif"
  416.          FontSize        =   8.25
  417.          FontStrikethru  =   0   'False
  418.          FontUnderline   =   0   'False
  419.          Height          =   195
  420.          Index           =   0
  421.          Left            =   210
  422.          TabIndex        =   6
  423.          Top             =   390
  424.          Width           =   1995
  425.       End
  426.    End
  427.    Begin BBSAboutMagic ABOUTMGC1 
  428.       Left            =   8520
  429.       Top             =   780
  430.    End
  431.    Begin CommandButton cmdOK 
  432.       Caption         =   "&OK"
  433.       Height          =   345
  434.       Left            =   7710
  435.       TabIndex        =   1
  436.       Top             =   300
  437.       Width           =   1425
  438.    End
  439.    Begin Line Line1 
  440.       BorderWidth     =   2
  441.       X1              =   810
  442.       X2              =   9120
  443.       Y1              =   1380
  444.       Y2              =   1380
  445.    End
  446.    Begin Label lblAboutmagic 
  447.       AutoSize        =   -1  'True
  448.       BackStyle       =   0  'Transparent
  449.       Caption         =   "This is a custom control to help make a professional looking ""About"" screen by giving the developer access to many different peices of information. See the information below... "
  450.       Height          =   645
  451.       Index           =   1
  452.       Left            =   780
  453.       TabIndex        =   2
  454.       Top             =   660
  455.       Width           =   6825
  456.       WordWrap        =   -1  'True
  457.    End
  458.    Begin Image imgIcon 
  459.       Height          =   480
  460.       Left            =   180
  461.       Picture         =   FRMABOUT.FRX:0302
  462.       Top             =   240
  463.       Width           =   480
  464.    End
  465.    Begin Label lblAboutmagic 
  466.       AutoSize        =   -1  'True
  467.       BackStyle       =   0  'Transparent
  468.       Caption         =   "Bits && Bytes Soltuions About Magic Version 1.0"
  469.       Height          =   195
  470.       Index           =   0
  471.       Left            =   780
  472.       TabIndex        =   0
  473.       Top             =   270
  474.       Width           =   4005
  475.    End
  476. Option Explicit
  477. '--------------------------------------------------
  478. ' bbsDriveInfo Function.
  479. ' This function will return all dirve information.
  480. '--------------------------------------------------
  481. Const bbsDI_TypeOfDrives = 1
  482. Const bbsDI_TotalDiskSpace = 2
  483. Const bbsDI_TotalFreeDiskSpace = 3
  484. Const bbsDI_TotalBytesPerSector = 4
  485. Const bbsDI_TotalSectorsPerCluster = 5
  486. Declare Function bbsDriveInfo Lib "ABOUTMGC.VBX" (ByVal Drive As String, ByVal DriveInfoID As Integer) As String
  487. '--------------------------------------------------
  488. Sub cmdOK_Click ()
  489.   End
  490. End Sub
  491. Sub Form_Load ()
  492.   ' Load the Windows Information.
  493.   Me!lblAboutmagicReturn(0) = Me!ABOUTMGC1.WindowsVersion
  494.   Me!lblAboutmagicReturn(1) = Me!ABOUTMGC1.WindowsDirectory
  495.   Me!lblAboutmagicReturn(2) = Me!ABOUTMGC1.WindowsSystemDirectory
  496.   Me!lblAboutmagicReturn(3) = Me!ABOUTMGC1.WindowsMode
  497.   Me!lblAboutmagicReturn(4) = Me!ABOUTMGC1.WindowsEmulation
  498.   Me!lblAboutmagicReturn(5) = Me!ABOUTMGC1.WindowsUpTime
  499.   Me!lblAboutmagicReturn(6) = Me!ABOUTMGC1.DOSVersion
  500.   ' Load the Computer Information.
  501.   Me!lblAboutmagicReturn(7) = Me!ABOUTMGC1.CPUType
  502.   Me!lblAboutmagicReturn(8) = Me!ABOUTMGC1.FreeGDIResources
  503.   Me!lblAboutmagicReturn(9) = Me!ABOUTMGC1.FreeUSERResources
  504.   Me!lblAboutmagicReturn(10) = Me!ABOUTMGC1.FreeSYSResources
  505.   Me!lblAboutmagicReturn(11) = Me!ABOUTMGC1.NextAvailableDrive
  506.   Me!lblAboutmagicReturn(12) = Me!ABOUTMGC1.TempDrive
  507.   Me!lblAboutmagicReturn(13) = Me!ABOUTMGC1.MathCoProcessor
  508.   Me!lblAboutmagicReturn(14) = Me!ABOUTMGC1.FreeMEMORY
  509.   ' Load Drive information.
  510.   Me!lstDriveInfo.Clear
  511.   Dim nDrvCntr    As Integer
  512.   Dim szDrive     As String
  513.   Dim bbsDI       As String
  514.   Dim szDriveInfo As String
  515.   Dim szDriveType As String
  516.   For nDrvCntr = 65 To 90 ' A - Z.
  517.     szDrive = Chr(nDrvCntr) & ":"
  518.     'lstDriveInfo.AddItem szDriveInfo
  519.     lstDriveInfo.AddItem "Drive " & szDrive & " Information------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
  520.     lstDriveInfo.AddItem Chr(9) & "Type of Drive:" & Chr(9) & Chr(9) & bbsDriveInfo(szDrive, bbsDI_TypeOfDrives)
  521.     szDriveType = (bbsDriveInfo(szDrive, bbsDI_TypeOfDrives))
  522.     If (bbsDriveInfo(szDrive, bbsDI_TypeOfDrives)) <> "Removable" Then
  523.       If (bbsDriveInfo(szDrive, bbsDI_TypeOfDrives)) <> "Undetermined" Then
  524.         lstDriveInfo.AddItem Chr(9) & "Total Disk Space:" & Chr(9) & Chr(9) & bbsDriveInfo(szDrive, bbsDI_TotalDiskSpace)
  525.         lstDriveInfo.AddItem Chr(9) & "Total Free Disk Space:" & Chr(9) & bbsDriveInfo(szDrive, bbsDI_TotalFreeDiskSpace)
  526.         lstDriveInfo.AddItem Chr(9) & "Total Bytes Per Sector:" & Chr(9) & bbsDriveInfo(szDrive, bbsDI_TotalBytesPerSector)
  527.         lstDriveInfo.AddItem Chr(9) & "Total Sectore Per Cluster:" & Chr(9) & bbsDriveInfo(szDrive, bbsDI_TotalSectorsPerCluster)
  528.       End If
  529.     End If
  530.   Next
  531. End Sub
  532. Sub tmrAboutMagic_Timer ()
  533.   ' Windows Up Time and resources are always running
  534.   ' so keep updating the window.
  535.   Me!lblAboutmagicReturn(5) = Me!ABOUTMGC1.WindowsUpTime
  536.   Me!lblAboutmagicReturn(8) = Me!ABOUTMGC1.FreeGDIResources
  537.   Me!lblAboutmagicReturn(9) = Me!ABOUTMGC1.FreeUSERResources
  538.   Me!lblAboutmagicReturn(10) = Me!ABOUTMGC1.FreeSYSResources
  539.   Me!lblAboutmagicReturn(14) = Me!ABOUTMGC1.FreeMEMORY
  540. End Sub
  541.