⑴ 簡單的VB小程序

在窗體添加一個標簽,一個計時器控制項,
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1000
Label1.Caption = "字體隨機變色"
End Sub

Private Sub Timer1_Timer()

Label1.ForeColor = RGB(Rnd * 256, Rnd * 256, Rnd * 256)
End Sub

⑵ vb小程序

用按鈕控制的話如下:

Private Sub Command1_Click()
For i = 1 To Len(Text1.Text)
If Not (Mid(Text1.Text, i, 1) = "a" Or Mid(Text1.Text, i, 1) = "o" Or Mid(Text1.Text, i, 1) = "i" Or Mid(Text1.Text, i, 1) = "e" Or Mid(Text1.Text, i, 1) = "u") Then
s = s & Mid(Text1.Text, i, 1)
End If
Next

Text1.Text = s
End Sub

直接限制文本枉輸入的如下:
Private Sub Text1_Change()
For i = 1 To Len(Text1.Text)
If Not (Mid(Text1.Text, i, 1) = "a" Or Mid(Text1.Text, i, 1) = "o" Or Mid(Text1.Text, i, 1) = "i" Or Mid(Text1.Text, i, 1) = "e" Or Mid(Text1.Text, i, 1) = "u") Then
s = s & Mid(Text1.Text, i, 1)
End If
Next

Text1.Text = s
End Sub

⑶ 用vb做的時鍾程序源代碼

你要的程序代碼來了,已經驗證OK!!!

Private Sub Form_Load()
Timer1.Interval = 1000
Label1.AutoSize = True
Label1.Caption = ""
End Sub

Private Sub Timer1_Timer()
Label1.Caption = Now
End Sub

你在窗體上添加一個timer控制項和一個label標簽,把上面的代碼復制進去看結果吧!以後共同努力!!!

⑷ vb小程序下載

請問是什麼程序, 叫我等如何回答?

⑸ VB編寫小時鍾程序

使用timer控制項進行計時
使用全局數組變數進行多人同時計時,用text控制項來設置人數
使用數學函數(如sin,cos)和時間函數(如:hour,second)實現動態指針時鍾

⑹ vb 小程序 謝謝

PrivateSubCommand1_Click()
DimiAsInteger,nAsInteger
Dima()AsInteger
n=100
ReDima(n)AsInteger
Fori=1Ton
a(i)=100*Rnd
Next
CallSortnum(a,n)
Fori=1Ton
IfSeven(a(i))=TrueThenPrinta(i);
Next
EndSub

SubSortnum(a()AsInteger,n)
DimiAsInteger,jAsInteger,tAsInteger
Fori=1Ton
Forj=iTon
Ifa(i)>a(j)Then
t=a(i)
a(i)=a(j)
a(j)=t
EndIf
Next
Next
EndSub
FunctionSeven(nAsInteger)AsBoolean
IfnMod7=0Then
Seven=True
Else
Seven=False
EndIf
EndFunction

⑺ VB小程序

首先插入一個Command,之後寫入代碼:
Private Sub Form_Load()
a = 1
End Sub
Private Sub Command1_Click()
If a=1 Then
Print "歡迎內進入"
a=2
Else
print "VB初學者容"
End if
End Sub

⑻ vb小程序下載地方

http://www.codefans.net/

⑼ VB6.0 倒計時的小程序

Dim ydsj As Date

Private Sub Form_Load()
ydsj = InputBox("請輸入約定時間!格式如括弧里:(年號/月號/日子)或者又如括弧里:(年號/月號/日子空格小時:分鍾:秒數)如下格式:", , "2011/1/1 00:00:00")
Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
Dim dqnyr As Date
If Now < ydsj Then

sysj = ydsj - Now

syn = Year(ydsj) - Year(Now) - 1

If Year(ydsj) = Year(Now) Then syn = syn + 1 '年

syy = 12 - Month(Now) & "+" & Month(ydsj) - 1 & "=" & 12 - Month(Now) + Month(ydsj) - 1

If Year(ydsj) = Year(Now) Then

syy = Month(ydsj) - Month(Now) - 1

If Month(ydsj) = Month(Now) Then syy = syy + 1

End If

'月

dqnf = Year(Now)

dqyf = Month(Now)

If dqyf = 12 Then

dqyf = 1

dqnf = dqnf + 1

End If

dqnyr = dqnf & "-" & dqyf & "- " & 1

syr = Fix(dqnyr - Now) & "+" & Day(ydsj) - 1 & "=" & Fix(dqnyr - Now) + Day(ydsj) - 1

If Year(ydsj) = Year(Now) And Month(ydsj) = Month(Now) Then syr = Fix(dqnyr - Now) - Fix(dqnyr - ydsj) '日

nowh = Format(Now, "hh")

nowm = Format(Now, "nn")

nows = Format(Now, "ss")

now1 = Date + 1

dqsyhms = now1 - Now

nowsyh = Format(dqsyhms, "hh")

nowsym = Format(dqsyhms, "nn")

nowsys = Format(dqsyhms, "ss")

ydhms = Format(ydsj, "hh:mm:ss")

ydh = Format(ydsj, "hh")

ydm = Format(ydsj, "nn")

yds = Format(ydsj, "ss")

syh = nowsyh & "+" & ydh & "=" & Val(nowsyh) + Val(ydh)
bzd = Format(ydsj, "yyyy-m-d")

If Format(Now, "yyyy-mm-dd") = Format(ydsj, "yyyy-mm-dd") Then

syh = ydh - nowh

End If

'時

sym = nowsym & "+" & ydm & "=" & Val(nowsym) + Val(ydm)

If Format(Now, "yyyy-mm-dd hh") = Format(ydsj, "yyyy-mm-dd hh") Then

sym = ydm - nowm

End If

'分

sys = nowsys & "+" & yds & "=" & Val(nowsys) + Val(yds)

If Format(Now, "yyyy-mm-dd hh:nn") = Format(ydsj, "yyyy-mm-dd hh:nn") Then

sys = yds - nows

End If
'秒

Label1.Caption = "當前時間是:" & Now & " 距 " & ydsj & "還有(" & syn & ")個年頭+(" & syy & ")個月份+(" & syr & ")個日子+(" & syh & ")小時+(" & sym & ")分鍾+(" & sys & ")秒;合計=: (" & sysj & ")天!"
ElseIf Now = ydsj Then

Label1.FontSize = 28

Label1.ForeColor = &HFF&

Label1.Caption = ydsj & "到了!祝您在以後的日子裡萬事如意,身體安康!88!88!"

Timer1.Interval = 8888
ElseIf Now > ydsj Then

Label1.FontSize = 28

Label1.ForeColor = &HFF0000

Label1.Caption = ydsj & "已經過了!祝您萬事如意,身體安康!"
End If
End Sub

⑽ 求一個vb小程序,很簡單的時間小程序

不用Timer.改模塊代碼即可。
1.模塊裡面找到
Private lngHook As Long這一行,改成
Private lngHook As Long,oldTimer As Long
2.模塊裡面找到
If p.vkCode = vbKeyF10 Then
MsgBox "你按下了F10"
End If
這三行,換成:
If p.vkCode = vbKeyF10 and Timer - oldTimer > 30 Then
MsgBox "你按下了F10"
oldTimer = Timer
End If

這樣你兩次快捷鍵按下間隔小於30秒時候將不彈出對話框