www.pudn.com > gdqj1a302.zip > SelNum3.frm
VERSION 5.00
Begin VB.Form fmSelNum3
BackColor = &H00808000&
BorderStyle = 0 'None
Caption = "SelNums"
ClientHeight = 2220
ClientLeft = 2940
ClientTop = 3525
ClientWidth = 7125
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 2220
ScaleWidth = 7125
ShowInTaskbar = 0 'False
Begin VB.TextBox Text1
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 3
Left = 2730
TabIndex = 7
Text = "0"
Top = 780
Visible = 0 'False
Width = 525
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 2
Left = 1920
TabIndex = 6
Text = "2"
Top = 750
Visible = 0 'False
Width = 525
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 1
Left = 1170
TabIndex = 5
Text = "1"
Top = 750
Visible = 0 'False
Width = 525
End
Begin VB.ListBox List1
Columns = 4
Height = 1020
Left = 3900
TabIndex = 4
Top = 840
Width = 2985
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 405
Left = 1950
TabIndex = 3
Top = 1500
Width = 1245
End
Begin VB.CommandButton Command1
Caption = "确认"
Height = 405
Left = 420
TabIndex = 2
Top = 1500
Width = 1245
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 0
Left = 390
TabIndex = 1
Text = "0"
Top = 750
Width = 525
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "请选择输入数字:"
Height = 345
Left = 360
TabIndex = 0
Top = 240
Width = 4785
End
End
Attribute VB_Name = "fmSelNum3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public nText As Integer
Public iNum1 As Integer
Public iNum2 As Integer
Public sNums As String
Public sSep As String
Public sNote As String
Dim iText As Integer
Private Sub Command1_Click()
Dim i%, v%
v% = Val(Text1(i%))
If v% < iNum1 Or v% > iNum2 Then
MsgBox "请重新输入参数"
Exit Sub
Else
sNums = Text1(0).Text
End If
For i% = 1 To nText - 1 '5.17
v% = Val(Text1(i%))
If v% < iNum1 Or v% > iNum2 Then
MsgBox "请重新输入参数"
Exit Sub
Else
sNums = sNums & sSep & Text1(i%).Text
End If
Next i%
Unload Me
End Sub
Private Sub Command2_Click()
sNums = ""
Unload Me
End Sub
Private Sub Form_Initialize()
nText = 2
End Sub
Private Sub Form_Load()
Dim i%
Label1.Caption = sNote
For i% = 0 To nText - 1
Text1(i%).Visible = True
Text1(i%).Text = iNum1
Next i%
' List1.Columns = 5
For i% = iNum1 To iNum2
List1.AddItem i%
Next i%
End Sub
Private Sub List1_Click()
Text1(iText) = List1.List(List1.ListIndex)
iText = iText + 1
If iText >= nText Then
iText = 0
End If
Text1(iText).SetFocus
End Sub