求VB源代码!!!

[复制链接]
查看11 | 回复1 | 2006-10-22 23:50:29 | 显示全部楼层 |阅读模式
四个文件放在同一个文件夹中,进入VB环境后,打开cro.vbp (这个是VB的工程文件),打开后工程文件后,Form1.frm(窗体文件)就可以打开了。 VB中的主要文件类型如下 扩展名 描述 .bas 基本模块 .cls 类模块 .ctl 用户控件文件 .ctx 用户控件的二进制文件 .dca 活动的设计器的高速缓存 .ddf 打包和展开向导 CAB 信息文件 .dep 打包和展开向导从属文件 .dob ActiveX 文档窗体文件 .dox ActiveX 文档二进制窗体文件 .dsr 活动的设计器文件 .dsx 活动的设计器的二进制文件 .dws 部署向导脚本文件 .frm 窗体文件 .frx 二进制窗体文件 .log 加载错误的日志文件 .oca 控件类型库缓存文件 .pag 属性页文件 .pgx 二进制属性页文件 .res 资源文件 .tlb 远程自动化类型库文件 .vbg Visual Basic 组工程文件 .vbl 控件许可文件 .vbp Visual Basic 工程文件 .vbr 远程自动化注册文件 .vbw Visual Basic 工程工作空间文件 .vbz 向导发射文件 .wct WebClass HTML 模板
回复

使用道具 举报

千问 | 2006-10-22 23:50:29 | 显示全部楼层
用记事本把下面的代码保存到Form1.Frm文件中。然后用VB打开,试试吧。===========VERSION5.00BeginVB.FormForm1BorderStyle=1'FixedSingleCaption="打地鼠"ClientHeight=2175ClientLeft=45ClientTop=330ClientWidth=1860LinkTopic="Form1"MaxButton=0'FalseMinButton=0'FalseScaleHeight=2175ScaleWidth=1860StartUpPosition=3'窗口缺省BeginVB.CommandButtonCommand1Caption="开始"Height=375Left=0TabIndex=9Top=1800Width=615EndBeginVB.TimerTimer1Interval=500Left=120Top=1920EndBeginVB.PictureBoxPicture1Height=615Index=8Left=1200ScaleHeight=555ScaleWidth=555TabIndex=8Top=1200Width=615EndBeginVB.PictureBoxPicture1Height=615Index=7Left=600ScaleHeight=555ScaleWidth=555TabIndex=7Top=1200Width=615EndBeginVB.PictureBoxPicture1Height=615Index=6Left=0ScaleHeight=555ScaleWidth=555TabIndex=6Top=1200Width=615EndBeginVB.PictureBoxPicture1Height=615Index=5Left=1200ScaleHeight=555ScaleWidth=555TabIndex=5Top=600Width=615EndBeginVB.PictureBoxPicture1Height=615Index=4Left=600ScaleHeight=555ScaleWidth=555TabIndex=4Top=600Width=615EndBeginVB.PictureBoxPicture1Height=615Index=3Left=0ScaleHeight=555ScaleWidth=555TabIndex=3Top=600Width=615EndBeginVB.PictureBoxPicture1Height=615Index=2Left=1200ScaleHeight=555ScaleWidth=555TabIndex=2Top=0Width=615EndBeginVB.PictureBoxPicture1Height=615Index=1Left=600ScaleHeight=555ScaleWidth=555TabIndex=1Top=0Width=615EndBeginVB.PictureBoxPicture1Height=615Index=0Left=0ScaleHeight=555ScaleWidth=555TabIndex=0Top=0Width=615EndBeginVB.LabelLabel1AutoSize=-1'TrueHeight=180Left=720TabIndex=10Top=1920Width=90EndEndAttributeVB_Name="Form1"AttributeVB_GlobalNameSpace=FalseAttributeVB_Creatable=FalseAttributeVB_PredeclaredId=TrueAttributeVB_Exposed=FalseDimiAsInteger,tAsIntegerPrivateSubCommand1_Click()OnErrorGoTohErrt=2*InputBox("请设置游戏时间,单位为秒:",,60)Caption=0Timer1.Enabled=TrueCommand1.Enabled=FalsehErr:EndSubPrivateSubForm_Load()Timer1.Enabled=FalseRandomizeForEachpInPicture1p.FontName="arial"p.FontSize=30NextEndSubPrivateSubPicture1_Click(IndexAsInteger)IfIndex=iThenCaption=Caption+1:t=t+1:Timer1_TimerEndSubPrivateSubTimer1_Timer()ForEachpInPicture1p.ClsNexti=Int(Rnd*9)Picture1(i).Printi+1t=t-1Label1.Caption="倒计时:"&Int(t/2)Ift=0ThenTimer1.Enabled=False:MsgBox"游戏结束,您共打到"&Caption&"次地鼠":i=-1:Command1.Enabled=TrueEndSub
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行