Public Class Form1
西宁ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为创新互联建站的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:028-86922220(备注:SSL证书合作)期待与您的合作!
Private Past As Date
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Past = Now
IO.File.AppendAllText("test.txt", Past.ToString, System.Text.Encoding.Default)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Now1 As Date = CDate(IO.File.ReadAllText("test.txt", System.Text.Encoding.Default))
Dim Now2 As Date = Now
MsgBox("从" Now1.ToString "到" Now2.ToString "经过了" CStr(CDate((Now2 - Now1).ToString)))
End Sub
实际情况修改下。
End Class
timer要用timer.start()开始记时,timer.Interval = 2000简单来说:在timer事件下一个textbox.selectAll()两秒全选一次textbox内容,运行不完不会有什么影响,线程等内容现在不必考虑
用timer控件 吧控件执行间隔设到1小时(60*60*1000MS)就行了.
把执行语句些到 timer 事件里面就行了.
跟用button一样..
简单吧