home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 2.00 Begin Form frmAboutMagic BackColor = &H00FFFFFF& BorderStyle = 3 'Fixed Double Caption = "About Magic Version 1.0" ClientHeight = 6405 ClientLeft = 1920 ClientTop = 2595 ClientWidth = 9390 Height = 6810 Icon = FRMABOUT.FRX:0000 Left = 1860 LinkTopic = "Form2" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 6405 ScaleWidth = 9390 Top = 2250 Width = 9510 Begin Timer tmrAboutMagic Interval = 1000 Left = 8070 Top = 780 End Begin Frame fraAboutMagic Caption = "Drive Information" Height = 1965 Index = 2 Left = 810 TabIndex = 5 Top = 4230 Width = 8325 Begin ListBox lstDriveInfo Height = 1395 Left = 210 TabIndex = 20 Top = 390 Width = 7935 End End Begin Frame fraAboutMagic Caption = "Computer Information" Height = 2625 Index = 1 Left = 5490 TabIndex = 4 Top = 1500 Width = 3645 Begin Label lblAboutmagicReturn Height = 255 Index = 14 Left = 1920 TabIndex = 28 Top = 2310 Width = 1485 End Begin Label lblAboutMagicComputerInfo Alignment = 1 'Right Justify Caption = "Free Memory:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 255 Index = 7 Left = 210 TabIndex = 29 Top = 2310 Width = 1650 End Begin Label lblAboutmagicReturn Height = 255 Index = 13 Left = 1920 TabIndex = 30 Top = 2040 Width = 1485 End Begin Label lblAboutmagicReturn Height = 255 Index = 12 Left = 1920 TabIndex = 31 Top = 1770 Width = 1485 End Begin Label lblAboutmagicReturn Height = 255 Index = 11 Left = 1920 TabIndex = 32 Top = 1500 Width = 1485 End Begin Label lblAboutmagicReturn Height = 255 Index = 10 Left = 1920 TabIndex = 33 Top = 1200 Width = 1485 End Begin Label lblAboutmagicReturn Height = 255 Index = 9 Left = 1920 TabIndex = 34 Top = 930 Width = 1485 End Begin Label lblAboutmagicReturn Height = 255 Index = 8 Left = 1920 TabIndex = 35 Top = 630 Width = 1485 End Begin Label lblAboutmagicReturn Height = 255 Index = 7 Left = 1920 TabIndex = 36 Top = 330 Width = 1485 End Begin Label lblAboutMagicComputerInfo Alignment = 1 'Right Justify Caption = "Math Co-Processor:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 255 Index = 6 Left = 210 TabIndex = 27 Top = 2040 Width = 1650 End Begin Label lblAboutMagicComputerInfo Alignment = 1 'Right Justify Caption = "Temporary Drive:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 255 Index = 5 Left = 210 TabIndex = 26 Top = 1770 Width = 1650 End Begin Label lblAboutMagicComputerInfo Alignment = 1 'Right Justify Caption = "Next Available Drive:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 255 Index = 4 Left = 210 TabIndex = 25 Top = 1500 Width = 1650 End Begin Label lblAboutMagicComputerInfo Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Free System Resources:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 195 Index = 3 Left = 90 TabIndex = 24 Top = 1200 Width = 1770 End Begin Label lblAboutMagicComputerInfo Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Free USER Resources:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 195 Index = 2 Left = 195 TabIndex = 23 Top = 900 Width = 1665 End Begin Label lblAboutMagicComputerInfo Alignment = 1 'Right Justify Caption = "Free GDI Resources:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 255 Index = 1 Left = 210 TabIndex = 22 Top = 600 Width = 1650 End Begin Label lblAboutMagicComputerInfo Alignment = 1 'Right Justify Caption = "CPU Type:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 255 Index = 0 Left = 210 TabIndex = 21 Top = 300 Width = 1650 End End Begin Frame fraAboutMagic Caption = "Windows Information" Height = 2625 Index = 0 Left = 810 TabIndex = 3 Top = 1500 Width = 4575 Begin Label lblAboutmagicReturn Height = 255 Index = 6 Left = 2250 TabIndex = 15 Top = 2190 Width = 2100 End Begin Label lblAboutmagicReturn Height = 255 Index = 5 Left = 2250 TabIndex = 19 Top = 1890 Width = 2100 End Begin Label lblAboutmagicReturn Height = 255 Index = 4 Left = 2250 TabIndex = 18 Top = 1590 Width = 2100 End Begin Label lblAboutmagicReturn Height = 255 Index = 3 Left = 2250 TabIndex = 17 Top = 1290 Width = 2100 End Begin Label lblAboutmagicReturn Height = 255 Index = 2 Left = 2250 TabIndex = 16 Top = 990 Width = 2100 End Begin Label lblAboutmagicReturn Height = 255 Index = 1 Left = 2250 TabIndex = 14 Top = 690 Width = 2100 End Begin Label lblAboutmagicReturn Height = 255 Index = 0 Left = 2250 TabIndex = 13 Top = 390 Width = 2100 End Begin Label lblWinInfo Alignment = 1 'Right Justify Caption = "MS-DOS Version:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 255 Index = 6 Left = 210 TabIndex = 12 Top = 2190 Width = 1995 End Begin Label lblWinInfo Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Windows Up Time:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 195 Index = 5 Left = 210 TabIndex = 11 Top = 1890 Width = 1995 End Begin Label lblWinInfo Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Windows Emulation:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 195 Index = 4 Left = 210 TabIndex = 10 Top = 1590 Width = 1995 End Begin Label lblWinInfo Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Windows Mode:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 195 Index = 3 Left = 210 TabIndex = 9 Top = 1290 Width = 1995 End Begin Label lblWinInfo Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Windows System Directory:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 195 Index = 2 Left = 210 TabIndex = 8 Top = 990 Width = 1995 End Begin Label lblWinInfo Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Windows Directory:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 195 Index = 1 Left = 210 TabIndex = 7 Top = 690 Width = 1995 End Begin Label lblWinInfo Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Windows Version:" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 195 Index = 0 Left = 210 TabIndex = 6 Top = 390 Width = 1995 End End Begin BBSAboutMagic ABOUTMGC1 Left = 8520 Top = 780 End Begin CommandButton cmdOK Caption = "&OK" Height = 345 Left = 7710 TabIndex = 1 Top = 300 Width = 1425 End Begin Line Line1 BorderWidth = 2 X1 = 810 X2 = 9120 Y1 = 1380 Y2 = 1380 End Begin Label lblAboutmagic AutoSize = -1 'True BackStyle = 0 'Transparent 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... " Height = 645 Index = 1 Left = 780 TabIndex = 2 Top = 660 Width = 6825 WordWrap = -1 'True End Begin Image imgIcon Height = 480 Left = 180 Picture = FRMABOUT.FRX:0302 Top = 240 Width = 480 End Begin Label lblAboutmagic AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Bits && Bytes Soltuions About Magic Version 1.0" Height = 195 Index = 0 Left = 780 TabIndex = 0 Top = 270 Width = 4005 End Option Explicit '-------------------------------------------------- ' bbsDriveInfo Function. ' This function will return all dirve information. '-------------------------------------------------- Const bbsDI_TypeOfDrives = 1 Const bbsDI_TotalDiskSpace = 2 Const bbsDI_TotalFreeDiskSpace = 3 Const bbsDI_TotalBytesPerSector = 4 Const bbsDI_TotalSectorsPerCluster = 5 Declare Function bbsDriveInfo Lib "ABOUTMGC.VBX" (ByVal Drive As String, ByVal DriveInfoID As Integer) As String '-------------------------------------------------- Sub cmdOK_Click () End End Sub Sub Form_Load () ' Load the Windows Information. Me!lblAboutmagicReturn(0) = Me!ABOUTMGC1.WindowsVersion Me!lblAboutmagicReturn(1) = Me!ABOUTMGC1.WindowsDirectory Me!lblAboutmagicReturn(2) = Me!ABOUTMGC1.WindowsSystemDirectory Me!lblAboutmagicReturn(3) = Me!ABOUTMGC1.WindowsMode Me!lblAboutmagicReturn(4) = Me!ABOUTMGC1.WindowsEmulation Me!lblAboutmagicReturn(5) = Me!ABOUTMGC1.WindowsUpTime Me!lblAboutmagicReturn(6) = Me!ABOUTMGC1.DOSVersion ' Load the Computer Information. Me!lblAboutmagicReturn(7) = Me!ABOUTMGC1.CPUType Me!lblAboutmagicReturn(8) = Me!ABOUTMGC1.FreeGDIResources Me!lblAboutmagicReturn(9) = Me!ABOUTMGC1.FreeUSERResources Me!lblAboutmagicReturn(10) = Me!ABOUTMGC1.FreeSYSResources Me!lblAboutmagicReturn(11) = Me!ABOUTMGC1.NextAvailableDrive Me!lblAboutmagicReturn(12) = Me!ABOUTMGC1.TempDrive Me!lblAboutmagicReturn(13) = Me!ABOUTMGC1.MathCoProcessor Me!lblAboutmagicReturn(14) = Me!ABOUTMGC1.FreeMEMORY ' Load Drive information. Me!lstDriveInfo.Clear Dim nDrvCntr As Integer Dim szDrive As String Dim bbsDI As String Dim szDriveInfo As String Dim szDriveType As String For nDrvCntr = 65 To 90 ' A - Z. szDrive = Chr(nDrvCntr) & ":" 'lstDriveInfo.AddItem szDriveInfo lstDriveInfo.AddItem "Drive " & szDrive & " Information------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------" lstDriveInfo.AddItem Chr(9) & "Type of Drive:" & Chr(9) & Chr(9) & bbsDriveInfo(szDrive, bbsDI_TypeOfDrives) szDriveType = (bbsDriveInfo(szDrive, bbsDI_TypeOfDrives)) If (bbsDriveInfo(szDrive, bbsDI_TypeOfDrives)) <> "Removable" Then If (bbsDriveInfo(szDrive, bbsDI_TypeOfDrives)) <> "Undetermined" Then lstDriveInfo.AddItem Chr(9) & "Total Disk Space:" & Chr(9) & Chr(9) & bbsDriveInfo(szDrive, bbsDI_TotalDiskSpace) lstDriveInfo.AddItem Chr(9) & "Total Free Disk Space:" & Chr(9) & bbsDriveInfo(szDrive, bbsDI_TotalFreeDiskSpace) lstDriveInfo.AddItem Chr(9) & "Total Bytes Per Sector:" & Chr(9) & bbsDriveInfo(szDrive, bbsDI_TotalBytesPerSector) lstDriveInfo.AddItem Chr(9) & "Total Sectore Per Cluster:" & Chr(9) & bbsDriveInfo(szDrive, bbsDI_TotalSectorsPerCluster) End If End If Next End Sub Sub tmrAboutMagic_Timer () ' Windows Up Time and resources are always running ' so keep updating the window. Me!lblAboutmagicReturn(5) = Me!ABOUTMGC1.WindowsUpTime Me!lblAboutmagicReturn(8) = Me!ABOUTMGC1.FreeGDIResources Me!lblAboutmagicReturn(9) = Me!ABOUTMGC1.FreeUSERResources Me!lblAboutmagicReturn(10) = Me!ABOUTMGC1.FreeSYSResources Me!lblAboutmagicReturn(14) = Me!ABOUTMGC1.FreeMEMORY End Sub