急!!VB窗体设计题,求大神帮忙~
1个回答
展开全部
楼主看看这个代码:
Option Explicit
Private aNum(15) As Long, mlSUM As Long
Private Function NumTest(v As Long) As Boolean
Dim a&, b&, c&
a = v Mod 10
b = (v \ 10) Mod 10
c = v \ 100
NumTest = a = b Or b = c Or c = a
End Function
Private Sub Command1_Click()
Dim i As Long
Dim v As Long
mlSUM = 0
For i = 100 To 999
v = Sqr(i)
If (i = v * v) Then
If (NumTest(i)) Then
aNum(mlSUM) = i
mlSUM = mlSUM + 1
End If
End If
Next
Me.Cls
For i = 0 To mlSUM - 1
Print aNum(i);
If (i Mod 3 = 2) Then Print
Next
End Sub
Private Sub Command2_Click()
Dim i As Long
If (mlSUM = 0) Then
MsgBox "没有数据。请先“查找”。", 32
Exit Sub
End If
Open "Test52.txt" For Output As #1
For i = 0 To mlSUM - 1
Print #1, aNum(i);
If (i Mod 3 = 2) Then Print #1,
Next
Close
End Sub
Private Sub Form_Load()
Command1.Caption = "查找"
Command2.Caption = "存盘"
End Sub
ZESTRON
2024-09-04 广告
2024-09-04 广告
在Dr. O.K. Wack Chemie GmbH,我们高度重视ZESTRON的表界面分析技术。该技术通过深入研究材料表面与界面的性质,为提升产品质量与可靠性提供了有力支持。ZESTRON的表界面分析不仅涵盖了相变化、化学反应、吸附与解吸...
点击进入详情页
本回答由ZESTRON提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询