VB.NET 小游戏 打地鼠

上传:a78161 浏览: 62 推荐: 0 文件:zip 大小:402KB 上传时间:2019-04-17 22:19:40 版权申诉
用VB.NET做的小游戏--打地鼠 Public Class Form1 Inherits System.Windows.Forms.Form Dim pic As New PictureBox Dim goal As Integer Dim i As Integer Dim j As Integer Dim xx1() As Integer = {135, 277, 417} Dim xx2() As Integer = {157, 367} Dim xx3() As Integer = {32, 251, 482} Dim timer As Double = 1 Dim co unt As Integer '计时器跳动次数 Dim ifclick As Boolean Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Text = "小游戏" Me.Size = New Size(650, 465) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Interval = 600 Timer1.Enabled = True Button2.Visible = True End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Button2.Text = "暂停" Then Button2.Text = "继续" Timer1.Enabled = False PictureBox1.Enabled = False ElseIf Button2.Text = "继续" Then Button2.Text = "暂停" Timer1.Enabled = True PictureBox1.Enabled = True End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.Close() End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick ifclick = False PictureBox1.Enabled = True If timer = 0 Then Timer1.Enabled = False MsgBox("游戏结束,您的得分:" + goal.ToString) Button3.Visible = False Exit Sub End If addpic() timer = 10 - count * 0.5 unt As Integer '计时器跳动次数 Dim ifclick As Boolean Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Text = "小游戏" Me.Size = New Size(650, 465) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Interval = 600 Timer1.Enabled = True Button2.Visible = True End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Button2.Text = "暂停" Then Button2.Text = "继续" Timer1.Enabled = False PictureBox1.Enabled = False ElseIf Button2.Text = "继续" Then Button2.Text = "暂停" Timer1.Enabled = True PictureBox1.Enabled = True End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.Close() End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick ifclick = False PictureBox1.Enabled = True If timer = 0 Then Timer1.Enabled = False MsgBox("游戏结束,您的得分:" + goal.ToString) Button3.Visible = False Exit Sub End If addpic() timer = 10 - count * 0.5
上传资源
用户评论

litaoxidian 2019-04-17 22:19:40

很好,直接运行

放飞梦想 2019-04-17 22:19:40

可以用、 谢谢、

cxy282441 2019-04-17 22:19:40

可以用的,用vs2005打开了,做的还不错

hpj_8716 2019-04-17 22:19:40

做的不错 程序没有报错已经很不容易了 改进了鼠标的指针图片 form1的背景图是不随窗口大小改变的 可以改一下

annoyance_76953 2019-04-17 22:19:40

整体都很赞呀!!!就是木有重来一局,最后还是自己改了

nyqingtian9 2019-04-17 22:19:40

这是我第一次从资源里下载下来就能直接跑起来的资源,虽然效果和功能感觉还有欠缺,不过整体还是很不错的,谢谢楼主的分享!

champagne_78062 2019-04-17 22:19:40

没有对鼠标的效果进行处理,不是我想要的,不过很感谢

qqfurnace43351 2019-04-17 22:19:40

可以直接运行,但好像不能重新开始。

half2168 2019-04-17 22:19:40

很好,可以直接运行

qqiceberg68134 2019-04-17 22:19:40

那个vb和vb.net 有啥区别?我无法用vb6.0打开