用VB6.0编写自我升级的程序(一)(2)
中华网科技 http://tech.china.com
2005-06-20 13:38:17
|
|
|
一、 projMain.vbp工程:
说明:这个是旧的主程序,从来没有进行过升级前的程序。
用记事本打开frmMain.frm文件,copy以下内容到其中:
VERSION 5.00
Begin VB.Form frmMain
Caption = "请点击升级进行程序"
ClientHeight = 1140
ClientLeft = 60
ClientTop = 345
ClientWidth = 4500
LinkTopic = "Form1"
ScaleHeight = 1140
ScaleWidth = 4500
StartUpPosition = 3 ‘窗口缺省
Begin VB.CommandButton Command1
Caption = "升级"
Height = 525
Left = 1380
TabIndex = 0
Top = 570
Width = 1245
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
‘ ------------------------------------------
‘ 升级程序的例子
‘ 作者: 谢家峰
‘ 日期: 2003/12/19
‘
‘ 这里是没有升级时的主程序
‘
‘ ------------------------------------------
Private Sub Command1_Click()
Command1.Enabled = False
‘ 运行更新程序
Shell App.Path & "update.exe", vbNormalFocus
End Sub
首页 上页 | 1 | 2 | 3 | 4 | 5... 下页 尾页 共 5 页 |