frmUpdata.frm
上传用户:yexiandon
上传日期:2022-07-12
资源大小:895k
文件大小:3k
- VERSION 5.00
- Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.OCX"
- Begin VB.Form frmUpdata
- BorderStyle = 3 'Fixed Dialog
- Caption = "在线升级"
- ClientHeight = 1935
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 4875
- Icon = "frmUpdata.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 1935
- ScaleWidth = 4875
- StartUpPosition = 2 '屏幕中心
- Begin VB.CommandButton cmdOK
- Caption = "升级(&U)"
- Height = 300
- Left = 2640
- TabIndex = 2
- Top = 1320
- Width = 900
- End
- Begin VB.CommandButton cmdCancel
- Caption = "取消(&C)"
- Height = 300
- Left = 3600
- TabIndex = 1
- Top = 1320
- Width = 900
- End
- Begin InetCtlsObjects.Inet Inet1
- Left = 120
- Top = 1200
- _ExtentX = 1005
- _ExtentY = 1005
- _Version = 393216
- End
- Begin VB.Label Label1
- Caption = "在线升级"
- BeginProperty Font
- Name = "楷体_GB2312"
- Size = 15
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 510
- Left = 360
- TabIndex = 0
- Top = 360
- Width = 3375
- End
- End
- Attribute VB_Name = "frmUpdata"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '****************************************************************************
- '人人为我,我为人人
- '枕善居收藏整理
- '发布日期:2008/01/21
- '描 述:汽车维修管理系统SQL2000版
- '网 站:http://www.Mndsoft.com/ (VB6源码博客)
- '网 站:http://www.VbDnet.com/ (VB.NET源码博客,主要基于.NET2005)
- 'e-mail :Mndsoft@163.com
- 'e-mail :Mndsoft@126.com
- 'OICQ :88382850
- ' 如果您有新的好的代码别忘记给枕善居哦!
- '****************************************************************************
- Public Sub UpData() '在线升级
- Dim i As Integer
- Label1.Caption = "正在检测服务器。。。"
- On Error Resume Next
- Dim MyData() As Byte, VerInfo() As Byte, Ti As Long, Tj As Long
- If Inet1.StillExecuting = True Then Label1.Caption = "服务器正忙,请稍候再试。": Exit Sub
- VerInfo() = Inet1.OpenURL("http://192.168.1.49/Updata/qx.txt", icString)
- Ti = InStr(1, VerInfo, vbCrLf) + 2
- Tj = InStr(Ti, VerInfo, vbCrLf)
- Label1.Caption = "正在升级。。。"
- MyData() = Inet1.OpenURL("http://192.168.1.49/Updata/" & Mid$(VerInfo, Ti, Tj - Ti), icByteArray)
- Open App.Path & "Garage.exe" For Binary Access Write As #2
- Put #2, , MyData()
- Close #2
- If Err.Number <> 0 Then
- Label1.Caption = "升级失败!"
- Else
- Label1.Caption = "成功完成升级!"
- cmdOK.Enabled = False
- cmdCancel.Caption = "关闭(&C)"
- End If
- End Sub
- Private Sub cmdCancel_Click()
- On Error Resume Next
- Shell App.Path & "Garage.exe", vbNormalFocus
- Unload Me
- End
- End Sub
- Private Sub cmdOK_Click()
- UpData
- End Sub