英语翻译Private Sub Command145_Click()Dim fname As StringCommonD
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/11 08:11:54
英语翻译
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 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() ‘单击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 Su
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 Su
英语翻译Private Sub cmdOK_Click()Dim SQL As StringDim rs As ADOD
英语翻译Private Sub Form_Click()Dim a(1 To 10) As Integer,i%,max
Private Sub Form_Click() Dim a As Integer,b As Integer,k As
Private Sub Command1_Click() Dim i As Double,M As Double,L A
Private Sub Command1_Click() Dim i As Integer,s As Integer,n
0402 Private Sub Command1_Click() Dim a As Single,b As Singl
Private Sub Command1_Click() Dim x As Single,y As Single Pic
33.设有如下程序Private Sub Command1_Click( )Dim sum As Double,x As
用vb 求π Private Sub Form_Click()Dim i As Long,pi As Double,k
Private Sub Command1_Click() Dim i,j As Integer For i = 3 To
循环语句解释Private Sub CommandButton1_Click() Dim icell,x,m,y As
几道VB程序题,Private Sub Command1_Click()Dim x As Integerx = Val(