- 博客(19)
- 收藏
- 关注
原创 菜单栏的制作
电气一班 杨建 15050341036菜单栏的制作1.打开VB2.右击’Form1‘空白处,单击’菜单编辑器‘。3.在‘菜单编辑器’中 标题为“文件(&E)”名称为“file”,单击‘下一个’; 标题为“编辑(&)”,名称为“compile”; 选中’编辑‘,单击‘插入’,单击'右箭头图标',标题为“新建工程(&N)”,名称为“NewProject”,快捷键
2016-06-22 18:00:41 347
原创 求出二维数组中m*n的鞍点
姓名:杨健专业:电气工程及其自动化 学号:15050341036 求出二维数组中m*n的鞍点一、实验目的: 1.掌握数组的声明和数组元素的引用 2.掌握定长数组和动态数组的使用 3.掌握数组的基本操作算法 4.掌握过程的定义和调用 二、实验内容 找一个n*m的二维数组的“鞍点”。“鞍点”
2016-06-22 17:59:08 2068
原创 制作登录窗口
姓名:杨健 专业:电气工程及其自动化 学号:15050341036 制作登录窗口一、 实验目的1、 掌握在窗体上添加控件的方法;2、 了解窗体等基本对象属性的设置方法;3、 掌握可视化数据管理器的使用方法;4、 掌握数据控件及绑定控件的使用方法;5、
2016-06-22 17:57:40 620
原创 为什么要判断k<m,k>m+1
Option Base 1Dim anma() As IntegerDim m As Byte, n As BytePrivate Sub Command1_Click()ClsMe.Font.Size = 30m = 5: n = 6ReDim anma(m, n)Dim i As Integer, j As IntegerFor i = 1 To m
2016-06-16 17:22:09 719
原创 1到100随机数
Private Sub Command1_Click()ClsDim a(1 To 100) As LongDim i As LongDim j As LongDim t As LongFor i = 1 To 100 a(i) = 10 + Rnd() * 100Next iFor i = 1 To 100 Print a(i)Next
2016-06-16 17:19:58 5919
原创 10个随机数
Private Sub Command1_Click() Cls Dim a(1 To 10) As Integer Dim i As Byte Dim j As Byte Dim t As Byte For i = 1 To 10 a(i) = 10 + Rnd() * 100 Next i
2016-06-16 17:18:37 447
原创 23的.16进制
Private Sub Command1_Click()Me.Font.Size = 60Print erjinzhi(23)End SubPrivate Function erjinzhi(m As Byte) As StringDim n As Byten = mConst er As Byte = 16Dim returns As StringDim
2016-05-07 17:48:27 1399
原创 数乘
Private Sub Command1_Click()ClsDim a() As ByteDim r() As ByteDim b As StringDim c As ByteDim i As LongDim L As LongL = Len(Me.Text1.Text)ReDim a(L)For i = 1 To L b = Mid(Me.Te
2016-04-21 17:26:53 378
原创 十的阶乘
Private Sub Command1_Click()ClsPrint 阶乘(10)End SubPrivate Function 阶乘(n As Integer) As LongIf n = 1 Then阶乘 = 1Else阶乘 = n * 阶乘(n - 1)End IfEnd Function
2016-04-14 17:38:51 1001
原创 用计数器计算1至100的和
Option ExplicitDim i As IntegerDim sum As IntegerPrivate Sub Command1_Click()ClsFont.Size = 70End SubPrivate Sub Timer1_Timer()sum = sum + ii = i + 1If i > 100 ThenMe.Timer1.Enab
2016-04-14 17:08:52 827
原创 余数和商
Private Sub Command1_Click()Dim n1 As ByteDim n2 As ByteDim yushu As ByteDim shang As ByteDim tempresult As Byten1 = Int(Val(Me.Text1.Text))n2 = Int(Val(Me.Text2.Text))tempresult = n1
2016-04-14 17:07:42 512
原创 VB上课心得体会
通过学习vb我基本学会了编辑一些小程序,掌握了一些基本的知识,得到了以下一些收获:1.富业余生活。曾经业余时间到处游手好闲的身影不见了,以前没事我肯定一动不动的坐在电脑面前摆弄电脑。是啊,想想以前,真是一无是处,一会找人砍大山,一会找人打游戏,一会就傻傻的坐在小板登上两眼无光,似是厌倦了红尘。现在有了VB,它给了我无穷的快乐,让我乐此不疲。2多了一门技术。VB是一门计算机编
2016-04-07 17:33:24 854
原创 n个随机数排列
Option Base 1Private Sub Command1_Click() Cls Dim x As Integer x = Int(Val(Me.Text1.Text)) Dim n As Integer Dim A() As Integer ReDim A(x) n = LBound(A)
2016-04-07 16:20:18 476
原创 十个数按大小排列
Private Sub Command1_Click()ClsDim x(15) As Integer, n As Integern = 1While n x(n) = Int(Rnd * 1000)n = n + 1WendDim swap As Integer, m As Integerm = 1While m n = 1While n If
2016-03-31 17:35:39 639
原创 VB中列出十个数
Private Sub Command1_Click() Cls Font.Size = 30 Dim n As Integer Dim sierdun(10) As Integer n = 1 While n sierdun(n) = Int(Rnd * 1000) n = n + 1
2016-03-31 17:34:16 419
原创 十五个数随机排序
Private Sub cmdSort_Click() Dim A(14) As Integer Dim I, J As Integer Dim Temp As Integer Form1.Cls Randomize For I = 0 To 14 A(I) = Int(Rnd * 1000) Next I For I = 0
2016-03-31 16:15:06 790
原创 红白糖水变换
Private Sub 变换_Click()Dim a As Stringa = Me.Label1.CaptionMe.Label1.Caption = Me.Label2.CaptionMe.Label2.Caption = aDim b As Stringb = Me.Label1.ForeColorMe.Label1.ForeColor = Me.Label2.
2016-03-24 17:39:17 430
原创 数据变换
Private Sub Command1_Click()ClsDim b As Integer, c As IntegerDim d As Integerc = Int(Rnd() * 1000)b = Int(Rnd() * 1000)Print "b=" & bPrint "c=" & cd = cc = bb = d
2016-03-24 16:22:03 613
原创 将a与b的值进行交换
将a与b的值进行交换Private Sub Form_Load() Cls Dim a As Integer, b As Integer, c As Integer a = 10: b = 20 Print "a=" & a Print "b=" & b c = a:
2016-03-17 17:27:23 1128
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人