home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_tools
/
vbabk
/
vba_bkma.frm
< prev
next >
Wrap
Text File
|
1994-07-03
|
6KB
|
176 lines
VERSION 2.00
Begin Form VBA_BKMA
Caption = "VBA_BKMA 1.0 Demo"
ClientHeight = 4020
ClientLeft = 2040
ClientTop = 1575
ClientWidth = 7365
Height = 4710
Icon = VBA_BKMA.FRX:0000
Left = 1980
LinkTopic = "Form1"
ScaleHeight = 4020
ScaleWidth = 7365
Top = 945
Width = 7485
Begin PictureBox pbBar
Align = 2 'Align Bottom
Height = 420
Left = 0
ScaleHeight = 390
ScaleWidth = 7335
TabIndex = 1
Top = 3600
Width = 7365
Begin CommandButton Command1
Caption = "&StopWatch"
Height = 375
Index = 2
Left = 2880
TabIndex = 4
Top = 0
Width = 1935
End
Begin CommandButton Command1
Caption = "&String Functions"
Height = 375
Index = 1
Left = 1320
TabIndex = 3
Top = 0
Width = 1575
End
Begin CommandButton Command1
Caption = "&Ini Functions"
Height = 375
Index = 0
Left = 0
TabIndex = 2
Top = 0
Width = 1335
End
Begin Label SW
Caption = "StopWatch"
Height = 375
Left = 4800
TabIndex = 5
Top = 0
Width = 2535
End
End
Begin ListBox List1
Height = 3150
Left = 120
Sorted = -1 'True
TabIndex = 0
Top = 120
Width = 6255
End
Begin Menu MnuAbout
Caption = "&About"
Begin Menu MA
Caption = "&Help..."
Index = 0
End
Begin Menu MA
Caption = "-"
Index = 100
End
Begin Menu MA
Caption = "&About..."
Index = 255
End
End
End
Dim AppAbout$
Sub Command1_Click (index As Integer)
Select Case index
Case 0
VBA_Ini.Visible = True
Case 1
VBA_STRINGS.Visible = True
Case 2
ResetStopWatch
A$ = Dir("*.*")
While Len(A$) > 0
A$ = Dir
Wend
SW = "Read Dir *.*:" + Format(StopWatch() / 1000, "0.000") + " Seconds"
End Select
End Sub
Sub Form_Load ()
App.HelpFile = "VBA_BKMA.HLP"
AppAbout$ = "Demo of some functions available in VBA_BKMA.DLL"
End Sub
Sub Form_Resize ()
Static DriveTypes$(5)
DriveTypes(0) = "Unknown or missing"
DriveTypes(1) = "Removeable"
DriveTypes(2) = "Fixed"
DriveTypes(3) = "Remote (Network/CDROM)"
list1.Move 0, 0, scalewidth, scaleheight - pbBar.Height
list1.Clear
list1.AddItem "Windows Directory [WinDir()]:" + WinDIR()
list1.AddItem "Windows System Directory [SysDir()]:" + SysDIR()
list1.AddItem "1st Writeable Hard Drive [TmpDrv()]:" + TmpDrv()
list1.AddItem "Temp File Name [TmpFile()]:" + TmpFile()
list1.AddItem "Dos Version [DosVersion()]:" + DosVersion()
list1.AddItem "Windows Version [WinVersion()]:" + WinVersion()
A$ = "USER.EXE"
For i = 1 To 6
list1.AddItem "Version Info on {" + A$ + "} " + Format(i, "0") + " [FileVersion($,%)]:" + FileVersion("USER.EXE", i)
Next i
For i = 1 To 10
A$ = Chr(64 + i) + ":"
list1.AddItem "Drive [" + A$ + "[ is [DrvType($)]:" + DriveTypes$(DrvType(A$))
Next i
For i = 0 To 255
A$ = dosEnv(i)
If Len(A$) > 0 Then
list1.AddItem "Dos Environment " + Format(i, "0") + " is [DosEnv(%)]:" + A$
Else
Exit For
End If
Next i
list1.AddItem "Memory UserFree%[WMemory(1)]:" + Str(WMemory(1))
list1.AddItem "Memory GDIFree%[WMemory(2)]:" + Str(WMemory(2))
list1.AddItem "PageMemory LargestFreeBlock[PageMemory(1)]:" + Str(PageMemory(1))
list1.AddItem "PageMemory MaxPagesAvailable[PageMemory(2)]:" + Str(PageMemory(2))
list1.AddItem "PageMemory MaxPagesLockable[PageMemory(3)]:" + Str(PageMemory(3))
list1.AddItem "PageMemory TotalLinearSpace[PageMemory(4)]:" + Str(PageMemory(4))
list1.AddItem "PageMemory TotalUnlockedPages[PageMemory(5)]:" + Str(PageMemory(5))
list1.AddItem "PageMemory FreePages[PageMemory(6)]:" + Str(PageMemory(6))
list1.AddItem "PageMemory TotalPages[PageMemory(7)]:" + Str(PageMemory(7))
list1.AddItem "PageMemory FreeLinearSpace[PageMemory(8)]:" + Str(PageMemory(8))
list1.AddItem "PageMemory SwapFilePages[PageMemory(9)]:" + Str(PageMemory(9))
list1.AddItem "PageMemory PageSize[PageMemory(10)]:" + Str(PageMemory(10))
list1.AddItem "CPU Type[Cpu()]:" + CPU()
list1.AddItem "CPUMode [CpuMode()]:" + CPUMode()
If MathCoprocessor() Then
list1.AddItem "Math Coprocessor [MathCoprocessor()]:TRUE"
Else
list1.AddItem "Math Coprocessor [MathCoprocessor()]:FALSE"
End If
A$ = "COMMDLG"
list1.AddItem "ModuleLocation of " + A$ + " [Module Location($)]:" + ModuleLocation(A$)
End Sub
Sub MA_Click (index As Integer)
Select Case index
Case 255
MsgBox AppAbout$, 255, "VBA_BKMA.DLL Version:" + FileVersion("VBA_BKMA.DLL", 1)
Case Else
rc = Shell("winhelp.exe " + App.HelpFile, 3)
End Select
End Sub