- 博客(27)
- 收藏
- 关注
原创 vb27
Option Explicit Const mxlogintimes As Integer = 3 Private Sub cmdlogin_Click() Dim cn As Connection Dim rs As Recordset Set cn = New Connection Set rs = New Recordset cn.ConnectionString = "p
2016-05-26 17:57:37 266
原创 vb26
Private Sub Command1_Click() Cls Dim a(100) As Integer Dim i As Integer Dim j As Integer For i = 1 To 100 a(i) = 10 + Int(Rnd() * 100) Next i Print For i = 1 To 99 For j = i + 1 To 100 If
2016-05-12 17:43:18 326
原创 vb25
Private Sub Command1_Click() Type student name As String stuno As String sex As Boolean age As Byte prof As String grade As String End Type Dim gaowenjing As student gaowenjing.name = "高文静"
2016-05-12 17:17:42 412
原创 vb24
Private Sub Command1_Click() Me.Font.Size = 6 Dim a(10) As Integer For i = 1 To 10 a(i) = 10 + Int(Rnd() * 100) Print a(i) Next i Print For i = 2 To 10 If a(1) swap a(1), a(i) End If
2016-05-07 18:09:57 265
原创 vb23
Private Sub Command1_Click() Dim a(10) As Integer Dim i As Integer For i = 1 To 10 a(i) = 10 + Int(Rnd() * 100) Print a(i) Next i Print Dim j As Integer For j = 1 To 9 For i = j + 1 To 10
2016-05-07 17:47:23 181
原创 vb22
Private Sub Command1_Click() Me.Font.Size = 30 Dim a As Integer Dim b As Integer Dim s As String Dim yushu As Byte a = 1230: b = 16 While a yushu = a Mod b s = f(yushu) & s a = a \ b Wend
2016-05-07 16:59:37 309
原创 vb21
Private Sub Command1_Click() Me.Font.Size = 30 Print shiliujinzhi(230) End Sub Private Function shiliujinzhi(m As Byte) AsString Dim n As Byte n = m Const shiliu As Byte = 16 Dim returns As St
2016-04-28 16:54:59 310
原创 vb20
Private Sub Command1_Click() Me.Font.Size = 30 Print erjinzhi(235) End Sub Private Function erjinzhi(m As Byte) AsString Dim n As Byte n = m Const er As Byte = 2 Dim returns As String Dim
2016-04-28 16:53:38 395
原创 vb19
Private Sub Command1_Click() Me.Font.Size = 30 Dim n As Byte n = 23 Const er As Byte = 2 Dim shang As Byte Dim yushu(1 To 5) As Byte Dim i As Byte i = 5 shang = n \ er yushu(i) = n Mod er
2016-04-28 16:22:55 250
原创 vb18
Private Sub Command1_Click() Cls Me.Font.Size = 50 Dim a() As Byte Dim r() As Byte Dim b As String Dim c As Byte Dim i As Long Dim l As Long l = Len(Me.Text1.Text) ReDim a(l) For i = 1 T
2016-04-21 17:40:36 495
原创 vb17
Private Sub Command1_Click() Dim a As Byte Dim b As String Dim c As Byte b = Mid(Me.Text1.Text, 1, 1) a1 = Int(Val(b)) b = Mid(Me.Text1.Text, 2, 1) a2 = Int(Val(b)) b = Mid(Me.Text1.Text, 3,
2016-04-21 16:40:20 427
原创 vb16
Private Sub Command1_Click() Cls Dim n1 As Byte Dim n2 As Byte Dim yushu As Byte Dim shang As Byte Dim typeresult As Byte n1 = Int(Val(Me.Text1.Text)) n2 = Int(Val(Me.Text2.Text)) tempresult
2016-04-14 17:21:24 514
原创 vb15
Option Base 1 Private Sub Command1_Click() Me.Font.Size = 30 Dim n1() As Byte, n1Len As Long Dim n2() As Byte, n2Len As Long Dim yushu1 As Byte Dim yushu2 As Byte Dim shang As Byte Dim tem
2016-04-14 17:06:50 325
原创 vb14
Private Sub Command1_Click() Font.Size = 30 Print 阶乘(1) End Sub Private Function 阶乘(n As Integer) As Long If n = 1 Then 阶乘 = 1 Else 阶乘 = n * 阶乘(n - 1) End If End Function
2016-04-14 16:29:25 199
原创 vb13
**又是一节vb课 没有上节课讲的难,但是也不简单*** Private Sub Command1_Click() Font.Size = 30 Print 阶乘(11) End Sub Private Function 阶乘(n As Integer) As Long If n = 1 Then 阶乘 = 1 Else 阶乘 = n * 阶乘(n - 1) End If End Fun
2016-04-14 16:24:35 597
原创 vb12
Private Sub Command1_Click() Cls Dim a As Integer, i As Integer, sum As Integer sum = 0 For i = 1 To 10 Randomize a = Int(1000 * Rnd) sum = sum + a MsgBox “10个随机数的和为: ” & sum NextEnd Sub
2016-04-07 17:36:27 206
原创 vb11
Private Sub Command1_Click() Cls Dim sum As Integer, i As Integer, a As Integer sum = 0 i = 1 Do While i <= 10 Randomize a = Int(1000 * Rnd) sum = sum + a i = i + 1 Loop MsgBox “10个随机数的和为: ”
2016-04-07 17:30:02 992
原创 vb10
Private Sub Command1_Click() Cls Dim sum As Integer, i As Integer, a As Integersum = 0 i = 1 Do Until i > 10 Randomize a = Int(1000 * Rnd) sum = sum + a i = i + 1 Loop MsgBox “10个随机数的和为; ” &
2016-04-07 17:24:38 222
原创 vb9
Private Sub Command1_Click() Cls Dim n As Integer, s As Integer Dim a(10) As Integer n = 1 While n <= 10 a(n) = Int(Rnd * 1000) n = n + 1 Wend n = 1 While n <= 10 Print a(n) n = n + 1 Wend
2016-04-07 17:05:45 349
原创 vb8
Dim sum As Integer Dim i As Integer Dim a As Integer Private Sub command1_click() sum = 0 For i = 1 To 10 Randomize a = Int(1000 * Rnd) sum = sum + a MsgBox “10个 随机数的和为: ” &
2016-04-07 16:57:56 521
原创 vb7
Private Sub Command1_Click() Cls Dim i As Integer Dim a(10) As Integer Randomize For i = 1 To 10 a(i) = Int(Rnd * 1000) + 1 Sum = Sum + a(i) Next i Print SumEnd
2016-04-07 16:55:44 563
原创 vb6
这是第二个 好累啊 还要写七个 Option Explicit Private Sub Command1_Click() Cls Dim i As Integer Dim a(10) As Integer Dim sum As Integer Randomize For i = 1 To 10 a(i) = Int(Rnd * 1000) + 1
2016-04-07 16:29:38 226
原创 vb5
Private Sub Command1_Click() Cls Print f(10) End Sub Private Function f(x As Integer) As Long If x = 1 Then f = x Else f = x + f(x - 1) End If End Function
2016-04-07 16:18:17 201
原创 vb4
Option Base 1 Private Sub Command1_Click() Cls Font.size = 30 Dim n As Integer Dim size As Integer size = Int(Val(Me.Text1.Text)) Dim xierdun() As Integer ReDim xierdun(size) n = LBound
2016-03-31 17:51:25 378
原创 vb3
真是要疯了 好难啊。。。。 在同学的帮助下终于完成了 Private Sub Command1_Click() Cls Font.Size = 20 Dim n As Integer Dim xierdun(15) As Integer n = 1 While n xierdun(n) = Int(Rnd * 1000) n = n + 1 Wend D
2016-03-31 17:13:07 266
原创 vb2
很难 智商不够用了。。。。 Private Sub Command1_Click() Cls Font.Size = 20 Dim n As Integer Dim xierdun(15) As Integer n = 1 While n xierdun(n) = Int(Rnd * 1000) n = n + 1 Wend n = 1 While n
2016-03-31 16:40:58 187
原创 vb1
(1)打开VB (2)在form中拉伸形成一个commond button (3)双击commond button在其中输入下面的字符 Private Sub Command1_Click() Cls Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer Dim e As Int
2016-03-24 17:44:26 273 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人