欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網(wǎng)!

vb

當(dāng)前位置:主頁 > 軟件編程 > vb >

VB實(shí)現(xiàn)的倒計(jì)時(shí)類代碼詳解

來源:本站原創(chuàng)|時(shí)間:2020-01-10|欄目:vb|點(diǎn)擊: 次

本文所述為用VB制作倒計(jì)時(shí)程序用到的一個(gè)Module類代碼,是基于控制臺(tái)的倒計(jì)時(shí)程序,可供VB初學(xué)者或者VB愛好者參考學(xué)習(xí),當(dāng)然讀者也可以將其拷貝代碼到VB工程里面直接使用,不過需要自己創(chuàng)建相關(guān)的代碼,對(duì)于初學(xué)者來說,也是很容易看懂的一段代碼。

具體功能代碼如下:

Module Module1 
Sub Main() 
Dim a As Date 
Dim h, m, s As Integer 
Dim n, i As Long 
Dim x, z As Long 
Dim y As Long 
Console.WriteLine("本程序?yàn)榈褂?jì)時(shí)程序,請(qǐng)分部輸入需要倒數(shù)的小時(shí)數(shù)、分鐘數(shù)、秒數(shù)") 
Console.WriteLine("請(qǐng)輸入計(jì)時(shí)的小時(shí)數(shù)(大于等于0的整數(shù)):") 
h = Console.ReadLine() 
Console.WriteLine("請(qǐng)輸入計(jì)時(shí)的總分鐘數(shù)(大于等于0并且小于60的整數(shù)):") 
m = Console.ReadLine() 
Console.WriteLine("請(qǐng)輸入計(jì)時(shí)的秒數(shù)(大于等于0的并且小于60的整數(shù)):") 
s = Console.ReadLine() 
Console.WriteLine("當(dāng)前系統(tǒng)時(shí)間為:{0}", h) 
a = Now() 
Console.WriteLine("當(dāng)前系統(tǒng)時(shí)間為:{0}", a) 
Console.WriteLine(" ") 
Console.WriteLine(" **************倒計(jì)時(shí)開始***************** ") 
Console.WriteLine(" **************倒計(jì)時(shí)開始***************** ") 
Console.WriteLine(" **************倒計(jì)時(shí)開始***************** ") 
Console.WriteLine(" **************倒計(jì)時(shí)開始***************** ") 
z = 0 
x = 60 
For i = 0 To h * 3600 + m * 60 + s 
For n = 0 To 6000000 
For y = 0 To 25 
z = z + 1 
Next 
Next 
If (h <= 0) And (m <= 0) And (s <= 0) Then Exit For 
If s > 0 Then 
s = s - 1 
Console.WriteLine(" 剩余:{0}小時(shí){1}分{2}秒", h, m, s) 
If (h <= 0) And (m <= 0) And (s <= 0) Then 
Console.WriteLine("倒計(jì)時(shí)完畢,隨意輸入字符將退出程序:") 

Exit For 
End If 
End If 
If s = 0 Then 
If m > 0 Then 
m = m - 1 
s = 59 
Console.WriteLine(" 剩余:{0}小時(shí){1}分{2}秒 ", h, m, s) 
End If 

If m = 0 And h > 0 And s = 0 Then 
h = h - 1 
m = 59 
s = 59 
Console.WriteLine(" 剩余:{0}小時(shí){1}分{2}秒 ", h, m, s) 
If (h <= 0) And (m <= 0) And (s <= 0) Then 
Console.WriteLine("倒計(jì)時(shí)完畢,隨意輸入字符將退出程序:") 
Exit For 
End If 
End If 
End If 
Next 
Console.Read() 
End Sub 
End Module

網(wǎng)頁制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語言數(shù)據(jù)庫服務(wù)器

如果侵犯了您的權(quán)利,請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有