home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_tools / vbabk / vba_bkma.frm < prev    next >
Text File  |  1994-07-03  |  6KB  |  176 lines

  1. VERSION 2.00
  2. Begin Form VBA_BKMA 
  3.    Caption         =   "VBA_BKMA 1.0 Demo"
  4.    ClientHeight    =   4020
  5.    ClientLeft      =   2040
  6.    ClientTop       =   1575
  7.    ClientWidth     =   7365
  8.    Height          =   4710
  9.    Icon            =   VBA_BKMA.FRX:0000
  10.    Left            =   1980
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4020
  13.    ScaleWidth      =   7365
  14.    Top             =   945
  15.    Width           =   7485
  16.    Begin PictureBox pbBar 
  17.       Align           =   2  'Align Bottom
  18.       Height          =   420
  19.       Left            =   0
  20.       ScaleHeight     =   390
  21.       ScaleWidth      =   7335
  22.       TabIndex        =   1
  23.       Top             =   3600
  24.       Width           =   7365
  25.       Begin CommandButton Command1 
  26.          Caption         =   "&StopWatch"
  27.          Height          =   375
  28.          Index           =   2
  29.          Left            =   2880
  30.          TabIndex        =   4
  31.          Top             =   0
  32.          Width           =   1935
  33.       End
  34.       Begin CommandButton Command1 
  35.          Caption         =   "&String Functions"
  36.          Height          =   375
  37.          Index           =   1
  38.          Left            =   1320
  39.          TabIndex        =   3
  40.          Top             =   0
  41.          Width           =   1575
  42.       End
  43.       Begin CommandButton Command1 
  44.          Caption         =   "&Ini Functions"
  45.          Height          =   375
  46.          Index           =   0
  47.          Left            =   0
  48.          TabIndex        =   2
  49.          Top             =   0
  50.          Width           =   1335
  51.       End
  52.       Begin Label SW 
  53.          Caption         =   "StopWatch"
  54.          Height          =   375
  55.          Left            =   4800
  56.          TabIndex        =   5
  57.          Top             =   0
  58.          Width           =   2535
  59.       End
  60.    End
  61.    Begin ListBox List1 
  62.       Height          =   3150
  63.       Left            =   120
  64.       Sorted          =   -1  'True
  65.       TabIndex        =   0
  66.       Top             =   120
  67.       Width           =   6255
  68.    End
  69.    Begin Menu MnuAbout 
  70.       Caption         =   "&About"
  71.       Begin Menu MA 
  72.          Caption         =   "&Help..."
  73.          Index           =   0
  74.       End
  75.       Begin Menu MA 
  76.          Caption         =   "-"
  77.          Index           =   100
  78.       End
  79.       Begin Menu MA 
  80.          Caption         =   "&About..."
  81.          Index           =   255
  82.       End
  83.    End
  84. End
  85. Dim AppAbout$
  86.  
  87. Sub Command1_Click (index As Integer)
  88. Select Case index
  89.     Case 0
  90.           VBA_Ini.Visible = True
  91.     Case 1
  92.         VBA_STRINGS.Visible = True
  93.     Case 2
  94.         ResetStopWatch
  95.         A$ = Dir("*.*")
  96.         While Len(A$) > 0
  97.             A$ = Dir
  98.         Wend
  99.         SW = "Read Dir *.*:" + Format(StopWatch() / 1000, "0.000") + " Seconds"
  100. End Select
  101. End Sub
  102.  
  103. Sub Form_Load ()
  104.  
  105. App.HelpFile = "VBA_BKMA.HLP"
  106. AppAbout$ = "Demo of some functions available in VBA_BKMA.DLL"
  107.  
  108. End Sub
  109.  
  110. Sub Form_Resize ()
  111. Static DriveTypes$(5)
  112. DriveTypes(0) = "Unknown or missing"
  113. DriveTypes(1) = "Removeable"
  114. DriveTypes(2) = "Fixed"
  115. DriveTypes(3) = "Remote (Network/CDROM)"
  116. list1.Move 0, 0, scalewidth, scaleheight - pbBar.Height
  117. list1.Clear
  118.  
  119. list1.AddItem "Windows Directory [WinDir()]:" + WinDIR()
  120.  
  121. list1.AddItem "Windows System Directory [SysDir()]:" + SysDIR()
  122. list1.AddItem "1st Writeable Hard Drive [TmpDrv()]:" + TmpDrv()
  123. list1.AddItem "Temp File Name [TmpFile()]:" + TmpFile()
  124. list1.AddItem "Dos Version [DosVersion()]:" + DosVersion()
  125. list1.AddItem "Windows Version [WinVersion()]:" + WinVersion()
  126. A$ = "USER.EXE"
  127. For i = 1 To 6
  128.     list1.AddItem "Version Info on {" + A$ + "} " + Format(i, "0") + " [FileVersion($,%)]:" + FileVersion("USER.EXE", i)
  129. Next i
  130.  
  131. For i = 1 To 10
  132.     A$ = Chr(64 + i) + ":"
  133.     list1.AddItem "Drive  [" + A$ + "[ is  [DrvType($)]:" + DriveTypes$(DrvType(A$))
  134. Next i
  135. For i = 0 To 255
  136.     A$ = dosEnv(i)
  137.     If Len(A$) > 0 Then
  138.         list1.AddItem "Dos Environment " + Format(i, "0") + " is [DosEnv(%)]:" + A$
  139.     Else
  140.         Exit For
  141.     End If
  142. Next i
  143. list1.AddItem "Memory UserFree%[WMemory(1)]:" + Str(WMemory(1))
  144. list1.AddItem "Memory GDIFree%[WMemory(2)]:" + Str(WMemory(2))
  145. list1.AddItem "PageMemory LargestFreeBlock[PageMemory(1)]:" + Str(PageMemory(1))
  146. list1.AddItem "PageMemory MaxPagesAvailable[PageMemory(2)]:" + Str(PageMemory(2))
  147. list1.AddItem "PageMemory MaxPagesLockable[PageMemory(3)]:" + Str(PageMemory(3))
  148. list1.AddItem "PageMemory TotalLinearSpace[PageMemory(4)]:" + Str(PageMemory(4))
  149. list1.AddItem "PageMemory TotalUnlockedPages[PageMemory(5)]:" + Str(PageMemory(5))
  150. list1.AddItem "PageMemory FreePages[PageMemory(6)]:" + Str(PageMemory(6))
  151. list1.AddItem "PageMemory TotalPages[PageMemory(7)]:" + Str(PageMemory(7))
  152. list1.AddItem "PageMemory FreeLinearSpace[PageMemory(8)]:" + Str(PageMemory(8))
  153. list1.AddItem "PageMemory SwapFilePages[PageMemory(9)]:" + Str(PageMemory(9))
  154. list1.AddItem "PageMemory PageSize[PageMemory(10)]:" + Str(PageMemory(10))
  155.  
  156. list1.AddItem "CPU Type[Cpu()]:" + CPU()
  157. list1.AddItem "CPUMode [CpuMode()]:" + CPUMode()
  158. If MathCoprocessor() Then
  159.     list1.AddItem "Math Coprocessor [MathCoprocessor()]:TRUE"
  160. Else
  161.     list1.AddItem "Math Coprocessor [MathCoprocessor()]:FALSE"
  162. End If
  163. A$ = "COMMDLG"
  164. list1.AddItem "ModuleLocation of " + A$ + " [Module Location($)]:" + ModuleLocation(A$)
  165. End Sub
  166.  
  167. Sub MA_Click (index As Integer)
  168. Select Case index
  169.     Case 255
  170.         MsgBox AppAbout$, 255, "VBA_BKMA.DLL Version:" + FileVersion("VBA_BKMA.DLL", 1)
  171.     Case Else
  172.         rc = Shell("winhelp.exe " + App.HelpFile, 3)
  173. End Select
  174. End Sub
  175.  
  176.