- 博客(11)
- 收藏
- 关注
原创 金箍棒变长
编程代码如下:Dim Step As IntegerPrivate Sub Command1_Click()Timer1.Enabled = FalseStep = Step + 150Line (1000, 1000)-(30 + Step, 1000), QBColor(Int(Rnd * 15))End SubPrivate Sub Timer1_Timer(
2012-05-22 20:41:23 397
原创 比较两个数的大小
Private Sub Command1_Click()Dim a As Integer, b As Integera = Val(Text1.Text)b = Val(Text2.Text)If a > b ThenLabel3.Caption = aElseLabel3.Caption = bEnd IfEnd Sub
2012-05-22 19:52:30 279
原创 随机生成十个数并选出最大值
代码如下: Private Function max(a() As Integer) As IntegerDim i As IntegerDim maxa As IntegerFor i = LBound(a) To UBound(a)If a(i) > maxa Thenmaxa = a(i)max = maxaEnd IfNext iEnd Functi
2012-05-22 19:49:49 1380
原创 动画设计
编写程序代码如下:Public TopBottom, LeftRight As StringPrivate Sub Form_Click() If Timer1.Enabled = False Then Timer1.Enabled = True Else Timer1.Enabled = False End IfEnd S
2012-05-22 19:47:18 206
原创 计算出生日是不是周末
Private Sub Command1_Click() Dim Year As Integer Dim Month As Integer Dim Day As Integer Dim DayOfWeek As Integer Dim Birthday As Date Year = Int(Val(Text1.Text)) Month = Int(Val(
2012-04-24 18:09:21 202
原创 税率金额
Private Sub Command1_Click()Dim x As DoubleDim y As Singlex = Val(Text1.Text)y = Val(Text2.Text)Select Case xCase Is y = x * 0.05Case Is y = x * 0.1Case Is y = x * 0.15Case Is
2012-04-24 18:06:51 200
原创 能同时被17和37整除的整数
Private Sub Combo1_Change()End SubPrivate Sub Command1_Click() Dim A As IntegerA = val(Text1.Text)If A Mod 17 = 0 Then If A Mod 37 = 0 Then Label3.Caption
2012-04-24 18:01:46 557
原创 两位数乘法运算——进制的编程
Option Base 1Private Sub Command1_Click() Dim M As String Dim N As String M = Trim(Text1.Text) N = Trim(Text2.Text) Dim Number1() As Byte Dim Number2() As Byt
2012-03-28 11:34:38 374
原创 VB实验报告
一:试验目的:1 利用vb程序设计语言制作随机图形2 利用vb程序设计语言制作动画二:实验内容:1先进行界面分布和相应的属性设置2编写代码如下:1,Private Sub Command1_Click()Timer1.Enabled = TrueTimer1.Interval = 100End SubPrivate Sub Command2_Click()
2012-03-27 21:21:01 341
原创 计算机作业
1101.01=2^3+2^2+0*2^1+2^0+0*2^-1+2^- =8+4+0+1+0+1/4 =13.25单精度浮点数同义词条:单精度。 根据IEEE754国际标准,常用的浮点数有两种格式(1) 单精度浮点数(Single)用来表示带有小数部分的实数,一般用于科学计算。占用4个字节(32位)存储空间,包括符号位1位,阶码8位,尾数23位。其数值范围为3.4E-38~3
2012-03-27 21:16:19 257
原创 第一节程序设计课
Option ExplicitPrivate Sub Command1_Click()Dim M As IntegerDim N As IntegerM = Int(Val(Text1.Text))N = Int(Val(Text2.Text))Dim TemparyValue As IntegerIf M TemparyValue = MM = NN =
2012-03-27 21:15:34 257
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人