VB.NET 小游戏 打地鼠

时间:2013-12-16 10:45:41
【文件属性】:

文件名称:VB.NET 小游戏 打地鼠

文件大小:402KB

文件格式:ZIP

更新时间:2013-12-16 10:45:41

小游戏 VB.NET 打地鼠

用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 count 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


【文件预览】:
打地鼠
----dadishu.sln(910B)
----dadishu()
--------bin()
--------Form1.vb(3KB)
--------obj()
--------Resources()
--------dadishu.vbproj(4KB)
--------My Project()
--------Form1.resx(6KB)
--------Form1.Designer.vb(6KB)
----dadishu.suo(19KB)

网友评论

  • 很好,直接运行
  • 可以用、 谢谢、
  • 可以用的,用vs2005打开了,做的还不错
  • 做的不错 程序没有报错已经很不容易了 改进了鼠标的指针图片 form1的背景图是不随窗口大小改变的 可以改一下
  • 整体都很赞呀!!!就是木有重来一局,最后还是自己改了
  • 这是我第一次从资源里下载下来就能直接跑起来的资源,虽然效果和功能感觉还有欠缺,不过整体还是很不错的,谢谢楼主的分享!
  • 没有对鼠标的效果进行处理,不是我想要的,不过很感谢
  • 可以直接运行,但好像不能重新开始。
  • 很好,可以直接运行
  • 那个vb和vb.net 有啥区别?我无法用vb6.0打开
  • 挺好的,不过只能玩一次,没有重新开始的功能
  • 很不错,能直接运行起!拿走了!