home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hot Shareware 35
/
hot35.iso
/
ficheros
/
LVB
/
T2W32534.ZIP
/
_WINDOWS.FRM
< prev
next >
Wrap
Text File
|
1998-05-02
|
26KB
|
894 lines
VERSION 5.00
Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
Begin VB.Form frmWindows
BorderStyle = 4 'Fixed ToolWindow
Caption = "Windows 95/NT 4.0x"
ClientHeight = 4845
ClientLeft = 1890
ClientTop = 3270
ClientWidth = 10815
MaxButton = 0 'False
MDIChild = -1 'True
PaletteMode = 1 'UseZOrder
ScaleHeight = 4845
ScaleWidth = 10815
ShowInTaskbar = 0 'False
Begin VB.TextBox txt_Result
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 4125
Left = 120
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 6
Top = 600
Width = 10635
End
Begin Threed.SSPanel SSPanel1
Align = 1 'Align Top
Height = 480
Left = 0
TabIndex = 0
Top = 0
Width = 10815
_Version = 65536
_ExtentX = 19076
_ExtentY = 847
_StockProps = 15
ForeColor = -2147483640
BackColor = 12632256
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Begin VB.ComboBox cmb_Function
Height = 315
Left = 1365
TabIndex = 1
Top = 90
Width = 8145
End
Begin Threed.SSCommand cmdNP
Height = 300
Index = 1
Left = 10500
TabIndex = 5
Top = 90
Width = 255
_Version = 65536
_ExtentX = 450
_ExtentY = 529
_StockProps = 78
Caption = ">"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BevelWidth = 1
Font3D = 3
RoundedCorners = 0 'False
Outline = 0 'False
End
Begin Threed.SSCommand cmdNP
Height = 300
Index = 0
Left = 9660
TabIndex = 4
Top = 90
Width = 255
_Version = 65536
_ExtentX = 450
_ExtentY = 529
_StockProps = 78
Caption = "<"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BevelWidth = 1
Font3D = 3
RoundedCorners = 0 'False
Outline = 0 'False
End
Begin Threed.SSCommand SSCommand1
Default = -1 'True
Height = 300
Left = 9975
TabIndex = 2
Top = 90
Width = 465
_Version = 65536
_ExtentX = 820
_ExtentY = 529
_StockProps = 78
Caption = "&Go"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BevelWidth = 1
RoundedCorners = 0 'False
Outline = 0 'False
End
Begin VB.Label Label2
Caption = "&Select a function"
Height = 255
Left = 90
TabIndex = 3
Top = 120
Width = 1275
End
End
End
Attribute VB_Name = "frmWindows"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Option Base 1
Private Const Iteration = 250
Dim IsLoaded As Integer
Dim TimerStartOk As Integer
Dim TimerCloseOk As Integer
Dim TimerHandle As Integer
Dim TimerValue As Long
Private Sub cmdNP_Click(Index As Integer)
Call sub_NextPrev(cmb_Function, Index)
End Sub
Private Sub cmb_Function_Click()
If (IsLoaded = False) Then Exit Sub
Call cDisableFI(mdiT2W.Picture1)
txt_Result = ""
DoEvents
Select Case cmb_Function.ListIndex
Case 0
Call TestMultitasksKeys(True)
Case 1
Call TestMultitasksKeys(False)
Case 2
Call TestLockKeyboard
Case 3
Call TestLockMouse
Case 4
Call TestModule
Case 5
Call TestProcess
Case 6
Call TestThread
Case 7
Call TestWalkThruWindows
Case 8
Call TestTrayBar
Case 9
Call TestOSValue
Case 10
Call TestIsKeyOn
Case 11
Call TestSetKeyState
Case 12
Call TestTrashFile
Case 13
Call TestGetShortPathName
Case 14
Call TestRunFile
End Select
DoEvents
Call cEnableFI(mdiT2W.Picture1)
End Sub
Private Sub Form_Activate()
mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
End Sub
Private Sub Form_Load()
IsLoaded = False
Show
Call sub_Load_Combo(cmb_Function, T2WDirInst + "_windows.t2w")
IsLoaded = True
End Sub
Private Sub SSCommand1_Click()
Call cmb_Function_Click
End Sub
Private Sub TestMultitasksKeys(status As Integer)
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
strResult = ""
strDisplay = ""
If (status = True) Then
Call cMultitasksKeys(True)
strDisplay = strDisplay & "MultitasksKeys" & vbCrLf & vbCrLf
strDisplay = strDisplay & " are now Disabled" & vbCrLf & vbCrLf
strDisplay = strDisplay & " Try CTRL+ALT+DEL or ALT+TAB or CTRL+ESC" & vbCrLf
Else
Call cMultitasksKeys(False)
strDisplay = strDisplay & "MultitasksKeys" & vbCrLf & vbCrLf
strDisplay = strDisplay & " are now Enabled" & vbCrLf & vbCrLf
strDisplay = strDisplay & " Try CTRL+ALT+DEL or ALT+TAB or CTRL+ESC" & vbCrLf
End If
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
'Call cMultitasksKeys(Status)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestLockKeyboard()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
strResult = ""
strDisplay = ""
intResult = cLockKeyboard(True, &H70)
If (intResult = True) Then
strDisplay = strDisplay & "Lock keyboard for 7 seconds (special unlock key = ALT+CTRL+SHIFT+F1)" & vbCrLf & vbCrLf
For i = 1 To 7
DoEvents
txt_Result = strDisplay
intResult = cSleep(1000)
strDisplay = strDisplay & "elapsed time : " & i & " second" & IIf(i = 1, "", "s") & vbCrLf
Next i
strDisplay = strDisplay & vbCrLf
strDisplay = strDisplay & "Start unlock keyboard" & vbCrLf
intResult = cLockKeyboard(False, 0)
If (intResult = True) Then
strDisplay = strDisplay & "Keyboard unlocked" & vbCrLf & vbCrLf
Else
strDisplay = strDisplay & "Can't unlock keyboard (cross your fingers)" & vbCrLf & vbCrLf
End If
Else
strDisplay = strDisplay & "Can't lock keyboard" & vbCrLf & vbCrLf
End If
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
'Call cLockKeyboard(True,0)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestLockMouse()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
strResult = ""
strDisplay = ""
intResult = cLockMouse(True, LOCK_MOUSE_ALL_CLICK)
If (intResult = True) Then
strDisplay = strDisplay & "Lock mouse (ALL CLICK) for 4 seconds" & vbCrLf & vbCrLf
For i = 1 To 4
DoEvents
txt_Result = strDisplay
intResult = cSleep(1000)
strDisplay = strDisplay & "elapsed time : " & i & " second" & IIf(i = 1, "", "s") & vbCrLf
Next i
strDisplay = strDisplay & vbCrLf
strDisplay = strDisplay & "Start unlock mouse" & vbCrLf
intResult = cLockMouse(False, 0)
If (intResult = True) Then
strDisplay = strDisplay & "Mouse unlocked" & vbCrLf & vbCrLf
Else
strDisplay = strDisplay & "Can't unlock mouse (cross your fingers)" & vbCrLf & vbCrLf
End If
Else
strDisplay = strDisplay & "Can't lock mouse" & vbCrLf & vbCrLf
End If
intResult = cLockMouse(True, LOCK_MOUSE_RCLICK)
If (intResult = True) Then
strDisplay = strDisplay & "Lock mouse (RIGHT CLICK) for 4 seconds" & vbCrLf & vbCrLf
For i = 1 To 4
DoEvents
txt_Result = strDisplay
intResult = cSleep(1000)
strDisplay = strDisplay & "elapsed time : " & i & " second" & IIf(i = 1, "", "s") & vbCrLf
Next i
strDisplay = strDisplay & vbCrLf
strDisplay = strDisplay & "Start unlock mouse" & vbCrLf
intResult = cLockMouse(False, 0)
If (intResult = True) Then
strDisplay = strDisplay & "Mouse unlocked" & vbCrLf & vbCrLf
Else
strDisplay = strDisplay & "Can't unlock mouse (cross your fingers)" & vbCrLf & vbCrLf
End If
Else
strDisplay = strDisplay & "Can't lock mouse" & vbCrLf & vbCrLf
End If
intResult = cLockMouse(True, LOCK_MOUSE_LCLICK)
If (intResult = True) Then
strDisplay = strDisplay & "Lock mouse (LEFT CLICK) for 4 seconds" & vbCrLf & vbCrLf
For i = 1 To 4
DoEvents
txt_Result = strDisplay
intResult = cSleep(1000)
strDisplay = strDisplay & "elapsed time : " & i & " second" & IIf(i = 1, "", "s") & vbCrLf
Next i
strDisplay = strDisplay & vbCrLf
strDisplay = strDisplay & "Start unlock mouse" & vbCrLf
intResult = cLockMouse(False, 0)
If (intResult = True) Then
strDisplay = strDisplay & "Mouse unlocked" & vbCrLf & vbCrLf
Else
strDisplay = strDisplay & "Can't unlock mouse (cross your fingers)" & vbCrLf & vbCrLf
End If
Else
strDisplay = strDisplay & "Can't lock mouse" & vbCrLf & vbCrLf
End If
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
'Call cLockMouse(True,0)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestModule()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim MODULEENTRY As tagMODULEENTRY
Dim i As Integer
strResult = ""
strDisplay = ""
strDisplay = strDisplay + "Current modules in memory " & vbCrLf & vbCrLf
intResult = cModule(MODULEENTRY, True)
While (intResult = True)
strDisplay = strDisplay & _
Hex$(MODULEENTRY.th32ModuleID) & " " & _
Hex$(MODULEENTRY.GlblcntUsage) & " " & _
Hex$(MODULEENTRY.ProccntUsage) & vbTab & _
Hex$(MODULEENTRY.modBaseSize) & vbTab & _
Hex$(MODULEENTRY.hModule) & vbTab & _
cGetIn(MODULEENTRY.szModule, Chr$(0), 1) & vbTab & _
cGetIn(MODULEENTRY.szExePath, Chr$(0), 1) & vbCrLf
intResult = cModule(MODULEENTRY, False)
Wend
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
intResult = cModule(MODULEENTRY, True)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestProcess()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim PROCESSENTRY As tagPROCESSENTRY
Dim i As Integer
strResult = ""
strDisplay = ""
strDisplay = strDisplay + "Current processes in memory " & vbCrLf & vbCrLf
intResult = cProcess(PROCESSENTRY, True)
While (intResult = True)
strDisplay = strDisplay & _
PROCESSENTRY.cntUsage & vbTab & _
Hex$(PROCESSENTRY.th32ProcessID) & " " & _
Hex$(PROCESSENTRY.th32ModuleID) & vbTab & _
PROCESSENTRY.cntThreads & vbTab & _
Hex$(PROCESSENTRY.th32ParentProcessID) & vbTab & _
cGetIn(PROCESSENTRY.szExeFile, Chr$(0), 1) & vbCrLf
intResult = cProcess(PROCESSENTRY, False)
Wend
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
intResult = cProcess(PROCESSENTRY, True)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestThread()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim THREADENTRY As tagTHREADENTRY
Dim i As Integer
strResult = ""
strDisplay = ""
strDisplay = strDisplay + "Current threads in memory " & vbCrLf & vbCrLf
intResult = cThread(THREADENTRY, True)
While (intResult = True)
strDisplay = strDisplay & _
Hex$(THREADENTRY.cntUsage) & vbTab & _
Hex$(THREADENTRY.th32ThreadID) & vbTab & _
Hex$(THREADENTRY.th32OwnerProcessID) & vbTab & _
Hex$(THREADENTRY.tpBasePri) & vbTab & _
Hex$(THREADENTRY.tpDeltaPri) & vbTab & _
Hex$(THREADENTRY.dwFlags) & vbCrLf
intResult = cThread(THREADENTRY, False)
Wend
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
intResult = cThread(THREADENTRY, True)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestWalkThruWindows()
Dim lResult As Long
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim Class As String
Dim Caption As String
Dim OwnerHwnd As Long
Dim OwnerClass As String
Dim OwnerCaption As String
strResult = ""
strDisplay = ""
strDisplay = strDisplay + "Current windows in memory " & vbCrLf & vbCrLf
lResult = cWalkThruWindow(Class, Caption, OwnerHwnd, OwnerClass, OwnerCaption, True)
While (lResult <> 0)
strDisplay = strDisplay & _
Class & " | " & _
Caption & " | " & _
Hex$(OwnerHwnd) & " | " & _
OwnerClass & " | " & _
OwnerCaption & vbCrLf
lResult = cWalkThruWindow(Class, Caption, OwnerHwnd, OwnerClass, OwnerCaption, False)
Wend
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
lResult = cWalkThruWindow(Class, Caption, OwnerHwnd, OwnerClass, OwnerCaption, True)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestTrayBar()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
strResult = ""
strDisplay = ""
strDisplay = strDisplay & "TrayBar is now hidden for 3 seconds" & vbCrLf & vbCrLf
txt_Result = strDisplay
DoEvents
Call cTrayBar(TRAYBAR_HIDE)
intResult = cSleep(3000)
strDisplay = strDisplay & "TrayBar is now showed" & vbCrLf & vbCrLf
Call cTrayBar(TRAYBAR_SHOW)
txt_Result = strDisplay
DoEvents
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
'Call cTrayBar(TRAYBAR_SHOW)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestOSValue()
Dim lResult As Long
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
strResult = ""
strDisplay = ""
strDisplay = strDisplay + "OSBuildNumber : " & cGetOSBuildNumber() & " (" & (cGetOSBuildNumber() And &HFFFF&) & ":" & ((cGetOSBuildNumber() And &HFFFF0000) / 65536) & ")" & vbCrLf & vbCrLf
strDisplay = strDisplay + "OSCSDVersion : " & cGetOSCSDVersion() & vbCrLf & vbCrLf
strDisplay = strDisplay + "OSMajorVersion : " & cGetOSMajorVersion() & vbCrLf & vbCrLf
strDisplay = strDisplay + "OSMinorVersion : " & cGetOSMinorVersion() & vbCrLf & vbCrLf
strDisplay = strDisplay + "OSVersion : " & cGetOSVersion() & vbCrLf & vbCrLf
strDisplay = strDisplay + "OSPlatformId : " & cGetOSPlatformId() & vbCrLf & vbCrLf
strDisplay = strDisplay + "OSPlatformName : " & cGetOSPlatformName() & vbCrLf & vbCrLf
strDisplay = strDisplay + "IsWin95OSR2 : " & IIf(cIsWin95OSR2(), "Yes", "No") & vbCrLf & vbCrLf
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
lResult = cGetOSBuildNumber()
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestIsKeyOn()
Dim iResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
strResult = ""
strDisplay = ""
strDisplay = strDisplay + "INSERT is " & IIf(cIsInsertOn(), "On", "Off") & vbCrLf & vbCrLf
strDisplay = strDisplay + "NUM LOCK is " & IIf(cIsNumLockOn(), "On", "Off") & vbCrLf & vbCrLf
strDisplay = strDisplay + "CAPS LOCK is " & IIf(cIsCapsLockOn(), "On", "Off") & vbCrLf & vbCrLf
strDisplay = strDisplay + "SCROLL LOCK is " & IIf(cIsScrollLockOn(), "On", "Off") & vbCrLf & vbCrLf
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
iResult = cIsNumLockOn()
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestSetKeyState()
Dim iResult As Integer
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
strResult = ""
strDisplay = ""
strDisplay = strDisplay + "set INSERT ON is " & IIf(cSetInsert(True), "ok", "ko") & vbCrLf
intResult = cSleep(1000)
strDisplay = strDisplay + "set INSERT OFF is " & IIf(cSetInsert(False), "ok", "ko") & vbCrLf & vbCrLf
txt_Result = strDisplay
strDisplay = strDisplay + "set NUM LOCK ON is " & IIf(cSetNumLock(True), "ok", "ko") & vbCrLf
intResult = cSleep(1000)
strDisplay = strDisplay + "set NUM LOCK OFF is " & IIf(cSetNumLock(False), "ok", "ko") & vbCrLf & vbCrLf
txt_Result = strDisplay
strDisplay = strDisplay + "set CAPS LOCK ON is " & IIf(cSetCapsLock(True), "ok", "ko") & vbCrLf
intResult = cSleep(1000)
strDisplay = strDisplay + "set CAPS LOCK OFF is " & IIf(cSetCapsLock(False), "ok", "ko") & vbCrLf & vbCrLf
txt_Result = strDisplay
strDisplay = strDisplay + "set SCROLL LOCK ON is " & IIf(cSetScrollLock(True), "ok", "ko") & vbCrLf
intResult = cSleep(1000)
strDisplay = strDisplay + "set SCROLL LOCK OFF is " & IIf(cSetScrollLock(False), "ok", "ko") & vbCrLf & vbCrLf
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To (Iteration / 5)
iResult = cSetNumLock(IIf((i Mod 3) = 0, True, False))
intResult = cSleep(25)
iResult = cSetCapsLock(IIf(((i + 1) Mod 3) = 0, True, False))
intResult = cSleep(25)
iResult = cSetScrollLock(IIf(((i + 2) Mod 3) = 0, True, False))
intResult = cSleep(25)
Next i
iResult = cSetNumLock(False)
iResult = cSetCapsLock(False)
iResult = cSetScrollLock(False)
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub CreateTrashFile(File1 As String)
Close #1
Open File1 For Output Shared As #1
Print #1, "TIME TO WIN 32-Bit"
Print #1, "Trash File Test"
Close #1
End Sub
Private Sub TestTrashFile()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim File1 As String
Dim File2 As String
strResult = ""
strDisplay = ""
File1 = "Trash File Test (Permanent = True; Confirm = True)"
Call CreateTrashFile(File1)
strDisplay = strDisplay & "File '" & File1 & "' " & IIf(cTrashFile(File1, True, True) = True, "trashed", "is not trashed") & vbCrLf & vbCrLf
txt_Result = strDisplay
File1 = "Trash File Test (Permanent = True; Confirm = False)"
Call CreateTrashFile(File1)
strDisplay = strDisplay & "File '" & File1 & "' " & IIf(cTrashFile(File1, True, False) = True, "trashed", "is not trashed") & vbCrLf & vbCrLf
txt_Result = strDisplay
File1 = "Trash File Test (Permanent = False; Confirm = True)"
Call CreateTrashFile(File1)
strDisplay = strDisplay & "File '" & File1 & "' " & IIf(cTrashFile(File1, False, True) = True, "trashed", "is not trashed") & vbCrLf & vbCrLf
txt_Result = strDisplay
File1 = "Trash File Test (Permanent = False; Confirm = False)"
Call CreateTrashFile(File1)
strDisplay = strDisplay & "File '" & File1 & "' " & IIf(cTrashFile(File1, False, False) = True, "trashed", "is not trashed") & vbCrLf & vbCrLf
txt_Result = strDisplay
DoEvents
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To 5
Call CreateTrashFile(File1)
intResult = cTrashFile(File1, True, False)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestGetShortPathName()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim File1 As String
strResult = ""
strDisplay = ""
File1 = T2WDirTest + "\This is a long file name"
Call CreateTrashFile(File1)
strDisplay = strDisplay & "Short Path Name of '" & File1 & "' is " & vbCrLf & vbCrLf
strDisplay = strDisplay & cGetShortPathName(File1) & vbCrLf & vbCrLf
File1 = T2WDirTest + "\This is a long file name too"
Call CreateTrashFile(File1)
strDisplay = strDisplay & "Short Path Name of '" & File1 & "' is " & vbCrLf & vbCrLf
strDisplay = strDisplay & cGetShortPathName(File1) & vbCrLf & vbCrLf
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cGetShortPathName(File1)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestRunFile()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim lngResult As Long
Dim i As Integer
Dim File1 As String
strResult = ""
strDisplay = ""
lngResult = cRunFile("notepad.exe", "c:\autoexec.bat", "c:\", SW_NORMAL)
strDisplay = strDisplay & "hInstance of notepad.exe is " & lngResult & vbCrLf
txt_Result = strDisplay
' 'time the function
'
' TimerHandle = cTimerOpen()
' TimerStartOk = cTimerStart(TimerHandle)
'
' For i = 1 To Iteration
' strResult = cGetShortPathName(File1)
' Next i
'
' mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
'
' TimerCloseOk = cTimerClose(TimerHandle)
End Sub