ldcf.net
当前位置:首页 >> vB程序设计题,跪求大神解答...急,在线等....高分... >>

vB程序设计题,跪求大神解答...急,在线等....高分...

通过Keypress事件做,Keyascii是Ascii吗,通过按下键盘系统会检测到他的Ascii值,再把它转换成你想要替换的就行了,很简单,不想帮你写,自己动手丰衣足食吧。

Dim a(4) Private Sub Command1_Click() Randomize For i = 0 To 4 a(i) = Int(Rnd * 20) + 80 Text1(i).Text = a(i) Next End Sub Private Sub Command2_Click() For i = 0 To 4 For j = 0 To i If a(i) < a(j) Then t = a(i): a(i) = a(j): a(...

Public Function jiecheng(ByVal n As Integer) As Integer Dim jc As Integer = 1 For i = 1 To n jc = jc * i Next Return jcEnd FunctionPublic Function jiecheng(ByVal n As Integer) As Double Dim jc As Double jc = 1 For i = 1 To n jc...

建立二维数组 一个存真实数字 一个存对应次序 然后循环比大小拿次序去比

Private Sub Form_Click()Dim s As Double, k AsIntegerS = 0K = 1Do S = S+1/ (K * (K + 1) ) K = K + 1loop Until K > 10Print SEnd Sub

Dim a(1 To 60) As IntegerPrivate Sub Command1_Click() For i = 1 To 59 For j = i + 1 To 60 If a(j) < a(i) Then t = a(i) a(i) = a(j) a(j) = t End If Next j Next i For i = 1 To 60 Print a(i); If i Mod 20 = 0 Then Print Next iEnd S...

Private Sub Command1_Click() Dim t As Integer, m As Single Do t = Val(InputBox("输入上网时间,-1为停止")) If t = -1 Then Exit Do Select Case t Case Is 300 Then m = 300 MsgBox "上网费用=" & Round(m, 2) & "元" Loop End Sub Privat...

Private Function IsH(n As Integer) As Boolean '判断所给n是不是回文数,是的话,IsH返回true,否返回false If Trim(Str(n)) = Trim(StrReverse(Str(n))) Then IsH = True Else IsH = FalseEnd FunctionPrivate Sub Command1_Click() if ish(val(...

现在还有人用vb

Dim t1 As Integer, t2 As Integer, sf As Integer, da As IntegerSub chuti()Randomizet1 = Int(Rnd * 90) + 10t2 = Int(Rnd * (t1 - 9)) + 10sf = Int(Rnd * 4)Select Case sfCase 0 Label1.Caption = t1 & " + " & t2 & " = " da = t1 + t2Ca...

网站首页 | 网站地图
All rights reserved Powered by www.ldcf.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com