展开全部
File--New--Standard.exe--点击左侧的Commandbutton控件
然后再Form1中用鼠标画出一个按钮
然后双击该按钮:写这段代码a = MsgBox("Hello,welcome to VB world!")
然后保存,运行
From1代码:
Private Sub Command1_Click()
End Sub
Private Sub Button_Click()
a = MsgBox("Hello,welcome to VB world!")
End Sub
Private Sub Form_Load()
End Sub
然后再Form1中用鼠标画出一个按钮
然后双击该按钮:写这段代码a = MsgBox("Hello,welcome to VB world!")
然后保存,运行
From1代码:
Private Sub Command1_Click()
End Sub
Private Sub Button_Click()
a = MsgBox("Hello,welcome to VB world!")
End Sub
Private Sub Form_Load()
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Option Explicit
Private Declare Function SHRunDialog Lib "shell32" Alias "#61" _
(ByVal hOwner As Long, _
ByVal Unknown1 As Long, _
ByVal Unknown2 As Long, _
ByVal szTitle As String, _
ByVal szPrompt As String, _
ByVal uFlags As Long) As Long
Private Sub Form_click()
SHRunDialog hWnd, 0, 0, vbNullString, vbNullString, -0
End Sub
Private Declare Function SHRunDialog Lib "shell32" Alias "#61" _
(ByVal hOwner As Long, _
ByVal Unknown1 As Long, _
ByVal Unknown2 As Long, _
ByVal szTitle As String, _
ByVal szPrompt As String, _
ByVal uFlags As Long) As Long
Private Sub Form_click()
SHRunDialog hWnd, 0, 0, vbNullString, vbNullString, -0
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
九九乘法:
Private Sub Form_Click()
Dim i As Integer
Dim j As Integer
For i = 1 To 9
For j = 1 To i
Me.ForeColor = vbGreen
Print Tab((j - 1) * 10); CStr(j) & "*" & CStr(i) & "=";
Me.ForeColor = vbBlue
Print CStr(i * j);
Next j
Print
Next i
Print Sum
End Sub
Private Sub Form_Click()
Dim i As Integer
Dim j As Integer
For i = 1 To 9
For j = 1 To i
Me.ForeColor = vbGreen
Print Tab((j - 1) * 10); CStr(j) & "*" & CStr(i) & "=";
Me.ForeColor = vbBlue
Print CStr(i * j);
Next j
Next i
Print Sum
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
For a = 1 To 9
For b = 1 To a
Print a; "*"; b; "="; a * b;
Next b
Print
Next a
For b = 1 To a
Print a; "*"; b; "="; a * b;
Next b
Next a
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询