VB程序代码(简单小程序)教学文案.doc
《VB程序代码(简单小程序)教学文案.doc》由会员分享,可在线阅读,更多相关《VB程序代码(简单小程序)教学文案.doc(4页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、如有侵权,请联系网站删除,仅供学习与交流VB程序代码(简单小程序)【精品文档】第 4 页实验一:(带有进度条的倒计时程序)Public Class Form1 Dim timers As Integer Dim temp As Integer Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If (ProgressBar1.Value + ProgressBar1.Maximum / timers ProgressBar1.Maximu
2、m) Then ProgressBar1.Value += ProgressBar1.Maximum / timers Else Timer1.Enabled = False ProgressBar1.Value = ProgressBar1.Maximum MessageBox.Show(进度完成!) End If temp += 1 Label1.Text = temp.ToString() End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles M
3、yBase.Load timers = 30 End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click timers = Val(InputBox(输入, 请输入总时间。, 30, 0, 0) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
4、Timer1.Enabled = True End SubEnd Class实验二(定时器控制蝴蝶飞舞)Public Class Form1 Dim t As Integer Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim t As Boolean If t = True Then PictureBox3.Image = PictureBox2.Image t = False Else PictureBox3.Image = P
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- VB 程序代码 简单 程序 教学 文案
限制150内