英语翻译Private Sub Command145_Click()Dim fname As StringCommonDialog1.ShowSaveIf Form1.Caption = "未命名" Or Form1.Caption = "" Thenfname = CommonDialog1.FileNameElsefname = Form1.CaptionEnd IfIf fname "" ThenOpen fname For Output As #1Print
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 18:24:11
英语翻译Private Sub Command145_Click()Dim fname As StringCommonDialog1.ShowSaveIf Form1.Caption = "未命名" Or Form1.Caption = "" Thenfname = CommonDialog1.FileNameElsefname = Form1.CaptionEnd IfIf fname "" ThenOpen fname For Output As #1Print
英语翻译
Private Sub Command145_Click()
Dim fname As String
CommonDialog1.ShowSave
If Form1.Caption = "未命名" Or Form1.Caption = "" Then
fname = CommonDialog1.FileName
Else
fname = Form1.Caption
End If
If fname "" Then
Open fname For Output As #1
Print #1,Text1.Text
Close #1
End If
End Sub
Private Sub Command18_Click()
If Text49.Text = 1 Then
Text22.Text = Val(Label12.Caption) + 1
End If
If Text49.Text = 2 Then
Text22.Text = Val(Label12.Caption) + 3
End If
Label12.Caption = Text22.Text
Dim X,Y As Integer
X = Label12.Caption
Y = Label12.Caption
Select Case X
Case Is > 0
Command11.BackColor = vbRed
End Select
Select Case Y
Case Is < 0
Command11.BackColor = &H8000000F
End Select
End Sub
英语翻译Private Sub Command145_Click()Dim fname As StringCommonDialog1.ShowSaveIf Form1.Caption = "未命名" Or Form1.Caption = "" Thenfname = CommonDialog1.FileNameElsefname = Form1.CaptionEnd IfIf fname "" ThenOpen fname For Output As #1Print
Private Sub Command145_Click() ‘单击Command145时执行下列代码
Dim fname As String ’定义fname 为字符串变量
CommonDialog1.ShowSave ‘保存对话框
If Form1.Caption = "未命名" Or Form1.Caption = "" Then
’如果窗体的显示标题为"未命名"或者为空,则
fname = CommonDialog1.FileName
‘fname为保存对话框中输入的名字.
Else ’否则
fname = Form1.Caption ‘fname为窗体显示的名字
End If ’IF过程结束
If fname "" Then ‘如果fname的值不为空
Open fname For Output As #1 ’以覆盖的方式大开fname
Print #1,Text1.Text '将Text1中的内容记入fname文件
Close #1 ‘关闭fname文件
End If ’if过程结束
End Sub
Private Sub Command18_Click() ’单击Command18时执行下列代码
If Text49.Text = 1 Then ‘如果Text49中的内容为“1",则
Text22.Text = Val(Label12.Caption) + 1
’Text22的内容变为标签Label12中内容变成数字并加1
End If ‘if过程结束
If Text49.Text = 2 Then ’同上
Text22.Text = Val(Label12.Caption) + 3
End If
Label12.Caption = Text22.Text
‘标签Label12的内容变为Text22中的内容
Dim X,Y As Integer
’定义变量x为变体型,定义变量y为整型
X = Label12.Caption
‘变量x的值等于Label12中的内容
Y = Label12.Caption
’变量y的值等于Label12中的内容
Select Case X ‘一种判断句,变量为x
Case Is > 0 ’当x>0时
Command11.BackColor = vbRed
‘按钮Command11的颜色为红色
End Select ’判断过程结束
Select Case Y‘同上
Case Is < 0
Command11.BackColor = &H8000000F
End Select
End Sub
这么长的东西,才给这么点分,没动力啊。。。我是学JAVA的!懂点程序啊