spwork spwork
关注数: 24 粉丝数: 117 发帖数: 1,784 关注贴吧数: 19
QQ升级天数计算器 form1.frm:VERSION 5.00Begin VB.Form Form1 BorderStyle = 4 'Fixed ToolWindow Caption = "Form1" ClientHeight = 1035 ClientLeft = 45 ClientTop = 360 ClientWidth = 3705 LinkTopic = "Form1" LockControls = -1 'True MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 1035 ScaleWidth = 3705 ShowInTaskbar = 0 'False StartUpPosition = 3 'Windows Default Begin VB.TextBox Text1 Alignment = 2 'Center Height = 285 Left = 630 TabIndex = 0 Text = "1" Top = 195 Width = 825 End Begin VB.Label Label3 AutoSize = -1 'True Caption = "Label3" Height = 195 Left = 180 TabIndex = 3 Top = 600 Width = 480 End Begin VB.Label Label2 AutoSize = -1 'True Caption = "级需要" Height = 195 Left = 1545 TabIndex = 2 Top = 240 Width = 540 End Begin VB.Label Label1 AutoSize = -1 'True Caption = "升到" Height = 195 Left = 195 TabIndex = 1 Top = 240 Width = 360 EndEndAttribute VB_Name = "Form1"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalsePrivate Sub Form_Load()Call Text1_ChangeEnd SubPrivate Sub Text1_Change()On Error GoTo ErrrIf Text1.Text < 0 Then GoTo ErrrLabel2.Caption = "级需要 " & Text1.Text ^ 2 + 4 * Text1.Text & " 天"If Text1.Text = 1 ThenLabel3.Caption = "从 0 级升到 1 级需要 5 天"ElseLabel3.Caption = "从 " & Text1.Text - 1 & " 级升到 " & Text1.Text & " 级需要 " & Text1.Text ^ 2 + 4 * (Text1.Text - 1) - (Text1.Text - 1) ^ 2 & " 天"End IfExit SubErrr:Label2.Caption = ""Label3.Caption = ""End Sub
1 下一页