获取里面MyEvent这个事件的反馈值Imports System
Imports System.Reflection
Imports System.Security
Imports Microsoft.VisualBasic
' Compile this sample using the following command line:
' vbc type_getevent.vb /r:"System.Windows.Forms.dll" /r:"System.dll"
Class MyEventExample
Public Shared Sub Main()
Try
Dim myType As Type = GetType(System.Windows.Forms.Button)
Dim myEvent As EventInfo = myType.GetEvent("Click")
If Not (myEvent Is Nothing) Then
Console.WriteLine(ControlChars.Cr + "Looking for the Click event in the Button class.")
Console.WriteLine(ControlChars.Cr + myEvent.ToString())
Else
Console.WriteLine("The Click event is not available with the Button class.")
End If
Catch e As SecurityException
Console.WriteLine("An exception occurred.")
Console.WriteLine("Message :" + e.Message)
Catch e As ArgumentNullException
Console.WriteLine("An exception occurred.")
Console.WriteLine("Message :" + e.Message)
Catch e As Exception
Console.WriteLine("The following exception was raised : {0}", e.Message)
End Try
End Sub 'Main
End Class 'MyEventExample
好个骨瘦如柴版! 可要在此基础上要再转为时分秒可就胖了
Call :etime 6:25:40.41 6:25:44.73 return
Echo %return%
Pause
:etime
rem 所测试任务的执行时间不超过1天 // 骨瘦如柴版
setlocal&set be=%~1:%~2&set cc=(%%d-%%a)*360000+(1%%e-1%%b)*6000+1%%f-1%%c&set dy=-8640000
for /f "delims=: tokens=1-6" %%a in ("%be:.=%")do endlocal&set/a %3=%cc%,%3+=%dy%*("%3>>31")&exit/b
用的是14楼的代码.