home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / FERRAMEN / VBABK / VBA_BKMA.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-07-03  |  5.5 KB  |  163 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. Dim AppAbout$
  85. Sub Command1_Click (index As Integer)
  86. Select Case index
  87.     Case 0
  88.           VBA_Ini.Visible = True
  89.     Case 1
  90.         VBA_STRINGS.Visible = True
  91.     Case 2
  92.         ResetStopWatch
  93.         A$ = Dir("*.*")
  94.         While Len(A$) > 0
  95.             A$ = Dir
  96.         Wend
  97.         SW = "Read Dir *.*:" + Format(StopWatch() / 1000, "0.000") + " Seconds"
  98. End Select
  99. End Sub
  100. Sub Form_Load ()
  101. App.HelpFile = "VBA_BKMA.HLP"
  102. AppAbout$ = "Demo of some functions available in VBA_BKMA.DLL"
  103. End Sub
  104. Sub Form_Resize ()
  105. Static DriveTypes$(5)
  106. DriveTypes(0) = "Unknown or missing"
  107. DriveTypes(1) = "Removeable"
  108. DriveTypes(2) = "Fixed"
  109. DriveTypes(3) = "Remote (Network/CDROM)"
  110. list1.Move 0, 0, scalewidth, scaleheight - pbBar.Height
  111. list1.Clear
  112. list1.AddItem "Windows Directory [WinDir()]:" + WinDIR()
  113. list1.AddItem "Windows System Directory [SysDir()]:" + SysDIR()
  114. list1.AddItem "1st Writeable Hard Drive [TmpDrv()]:" + TmpDrv()
  115. list1.AddItem "Temp File Name [TmpFile()]:" + TmpFile()
  116. list1.AddItem "Dos Version [DosVersion()]:" + DosVersion()
  117. list1.AddItem "Windows Version [WinVersion()]:" + WinVersion()
  118. A$ = "USER.EXE"
  119. For i = 1 To 6
  120.     list1.AddItem "Version Info on {" + A$ + "} " + Format(i, "0") + " [FileVersion($,%)]:" + FileVersion("USER.EXE", i)
  121. Next i
  122. For i = 1 To 10
  123.     A$ = Chr(64 + i) + ":"
  124.     list1.AddItem "Drive  [" + A$ + "[ is  [DrvType($)]:" + DriveTypes$(DrvType(A$))
  125. Next i
  126. For i = 0 To 255
  127.     A$ = dosEnv(i)
  128.     If Len(A$) > 0 Then
  129.         list1.AddItem "Dos Environment " + Format(i, "0") + " is [DosEnv(%)]:" + A$
  130.     Else
  131.         Exit For
  132.     End If
  133. Next i
  134. list1.AddItem "Memory UserFree%[WMemory(1)]:" + Str(WMemory(1))
  135. list1.AddItem "Memory GDIFree%[WMemory(2)]:" + Str(WMemory(2))
  136. list1.AddItem "PageMemory LargestFreeBlock[PageMemory(1)]:" + Str(PageMemory(1))
  137. list1.AddItem "PageMemory MaxPagesAvailable[PageMemory(2)]:" + Str(PageMemory(2))
  138. list1.AddItem "PageMemory MaxPagesLockable[PageMemory(3)]:" + Str(PageMemory(3))
  139. list1.AddItem "PageMemory TotalLinearSpace[PageMemory(4)]:" + Str(PageMemory(4))
  140. list1.AddItem "PageMemory TotalUnlockedPages[PageMemory(5)]:" + Str(PageMemory(5))
  141. list1.AddItem "PageMemory FreePages[PageMemory(6)]:" + Str(PageMemory(6))
  142. list1.AddItem "PageMemory TotalPages[PageMemory(7)]:" + Str(PageMemory(7))
  143. list1.AddItem "PageMemory FreeLinearSpace[PageMemory(8)]:" + Str(PageMemory(8))
  144. list1.AddItem "PageMemory SwapFilePages[PageMemory(9)]:" + Str(PageMemory(9))
  145. list1.AddItem "PageMemory PageSize[PageMemory(10)]:" + Str(PageMemory(10))
  146. list1.AddItem "CPU Type[Cpu()]:" + CPU()
  147. list1.AddItem "CPUMode [CpuMode()]:" + CPUMode()
  148. If MathCoprocessor() Then
  149.     list1.AddItem "Math Coprocessor [MathCoprocessor()]:TRUE"
  150.     list1.AddItem "Math Coprocessor [MathCoprocessor()]:FALSE"
  151. End If
  152. A$ = "COMMDLG"
  153. list1.AddItem "ModuleLocation of " + A$ + " [Module Location($)]:" + ModuleLocation(A$)
  154. End Sub
  155. Sub MA_Click (index As Integer)
  156. Select Case index
  157.     Case 255
  158.         MsgBox AppAbout$, 255, "VBA_BKMA.DLL Version:" + FileVersion("VBA_BKMA.DLL", 1)
  159.     Case Else
  160.         rc = Shell("winhelp.exe " + App.HelpFile, 3)
  161. End Select
  162. End Sub
  163.