当前位置 > 用vb做程序用vb做一个抽奖小程序
-
如何用VB做个一个流程图
Private Sub Command1_Click() Dim s As Double‘定义累加变量s来储存结果 Dim i As Double’定义i为计数变量。 For i = 1 To 10 s = s + 1 / i ^ 2 Next i Print s End Sub 第二个 Private Sub Command1_Click() Dim s As Double Dim i As Double For i = 1 To 99 step 2 s = s + i Next i Print...
2024-08-27 网络 更多内容 920 ℃ 336 -
vb做收银程序
添加几个按钮,名字设置为比如cake、apple等等 添加一个文本框,名字text1和一个按钮,caption为确定,名字为ok dim price as double private sub cake_click price=44.30 msgbox price end sub private sub apple_click price=23.60 msgbox price end sub private sub ok_click msgbox price-v...
2024-08-27 网络 更多内容 614 ℃ 65 -
想用VB做个按键的程序
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) Select Case KeyCode Case 87 MsgBox "按下W" Case 83 MsgBox "按下S" Case 65 MsgBox "按下A" Case 68 MsgBox "按下D" End Select End Sub keycode的值可...
2024-08-27 网络 更多内容 121 ℃ 277 -
用Vb编写程序
因为涉及窗体布局问题,直接叙述不方便,所以直接给你FRM文件。把下面的代码保存为后缀名为.frm的文件,再用VB打开。 ===================== VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 3195 ClientLeft = 60 ClientTop = 345 ClientWid...
2024-08-27 网络 更多内容 456 ℃ 423 -
VB高手帮忙做个小程序
那就用vb的脚本语言vbs模拟键盘代码看看吧: set WshShell = WScript.CreateObject("***.Shell") ***.Run "calc" WScript.Sleep 100 WshShell.AppActivate "Calculator" WScript.Sleep 100 WshShell.SendKeys "1{+}" WScript.Sleep 500 WshShell....
2024-08-27 网络 更多内容 982 ℃ 934 -
VB程序做随机抽奖
Private Sub Command1_Click() Randomize Label1.Caption = Fix(Rnd * 10) Label2.Caption = Fix(Rnd * 10) Label3.Caption = Fix(Rnd * 10) Labelshuzi.Caption = Fix(Rnd * 10) If Label1.Caption = Labelshuzi.Caption Or Label2.Caption = Labelshuzi.Caption Or Label3.Caption =Labelshuz...
2024-08-27 网络 更多内容 611 ℃ 746 -
帮我用VB做个程序(超简单)
Form1:一个计算”命令按钮(command1),三个文本框(text1、2、3) Form1代码: Public t1, T2, t3 Private Sub Command1_Click() t1 = Val(Text1.Text) T2 = Val(Text2.Text) t3 = Val(Text3.Text) If t1 > 0 And T2 > 0 And t3 > 0 Then ***.Show Else ***.Show End If End Sub Private Sub ...
2024-08-27 网络 更多内容 464 ℃ 312 -
用VB做=一=个产生随机数的程序
用VB做=一=个产生随机数的程序过程:1 创建随机数窗体:2 编写产生随机数的事件:Private Sub Command1_Click()Randomize '初始化随机数生成器List1.AddItem Int((Rnd * 9) + 1)End Sub3 运行结果:
2024-08-27 网络 更多内容 611 ℃ 318 -
用VB程序怎么做=一=个心型图?
VB.Label", "Label1") Set Timer1 = Me.Controls.Add("VB.Timer", "Timer1") Label1.Visible = True Label1.AutoSize = True Label1.BackStyle = 0 Label1.Caption = "I LOVE YOU" Label1.Font.Size = 60 Label1.ForeColor = &HFF00& Timer1...
2024-08-27 网络 更多内容 200 ℃ 275 -
用VB编写一个程序
Module Module1 Sub Main() Dim A(,) As Integer = {{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, {...
2024-08-27 网络 更多内容 188 ℃ 619