?? input.frm
字號:
VERSION 5.00
Begin VB.Form InputValues
BorderStyle = 3 'Fixed Dialog
Caption = "Specify values"
ClientHeight = 3495
ClientLeft = 45
ClientTop = 330
ClientWidth = 4095
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "Input.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3495
ScaleWidth = 4095
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.PictureBox Title
BackColor = &H80000005&
BorderStyle = 0 'None
Height = 615
Left = 0
ScaleHeight = 615
ScaleWidth = 3495
TabIndex = 7
Top = 0
Width = 3495
Begin VB.Label Label
BackColor = &H80000005&
Caption = "Specify input values to run the network on."
ForeColor = &H80000008&
Height = 255
Index = 0
Left = 240
TabIndex = 8
Top = 180
Width = 3375
End
Begin VB.Line TitleLine
BorderColor = &H80000015&
Index = 0
X1 = 120
X2 = 1080
Y1 = 480
Y2 = 480
End
Begin VB.Line TitleLine
BorderColor = &H00E0E0E0&
Index = 1
X1 = 600
X2 = 1560
Y1 = 495
Y2 = 495
End
End
Begin VB.CommandButton Command
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Index = 1
Left = 2400
TabIndex = 3
Top = 3000
Width = 1575
End
Begin VB.CommandButton Command
Caption = "OK"
Default = -1 'True
Height = 375
Index = 0
Left = 120
TabIndex = 2
Top = 3000
Width = 1575
End
Begin VB.PictureBox ScrollOuter
BorderStyle = 0 'None
Height = 2175
Left = 120
ScaleHeight = 2175
ScaleWidth = 3855
TabIndex = 4
TabStop = 0 'False
Top = 720
Width = 3855
Begin VB.VScrollBar Scroll
Height = 615
Left = 3600
TabIndex = 1
Top = 0
Width = 255
End
Begin VB.PictureBox ScrollInner
BorderStyle = 0 'None
Height = 960
Left = 0
ScaleHeight = 960
ScaleWidth = 3600
TabIndex = 5
TabStop = 0 'False
Top = 0
Width = 3600
Begin VB.TextBox iT
Height = 285
Index = 0
Left = 1680
TabIndex = 0
Text = "Text1"
Top = 0
Width = 1815
End
Begin VB.Label iL
Alignment = 1 'Right Justify
Caption = "a ="
Height = 255
Index = 0
Left = 0
TabIndex = 6
Top = 30
Width = 1575
End
End
End
End
Attribute VB_Name = "InputValues"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Canceled As Boolean
Private OriginalInputs() As Double
Private ChangedInputs() As Double
Private Sub Command_Click(Index As Integer)
Select Case Index
Case 0:
InputError = False
Canceled = False
For X = 0 To iT.UBound
If IsNumeric(iT(X)) Then
ChangedInputs(X) = iT(X)
Else
InputError = True
End If
Next X
If InputError Then
MsgBox "One or more of the input variables is not numeric. Please only insert numbers.", vbExclamation
Exit Sub
End If
Case 1:
Canceled = True
End Select
Me.Hide
End Sub
Private Sub Form_Load()
Canceled = True
End Sub
Private Sub Form_Resize()
Title.Width = Me.ScaleWidth
TitleLine(0).X1 = 0
TitleLine(0).X2 = Me.ScaleWidth
TitleLine(0).Y1 = Title.Height - 30
TitleLine(0).Y2 = Title.Height - 30
TitleLine(1).X1 = 0
TitleLine(1).X2 = Me.ScaleWidth
TitleLine(1).Y1 = Title.Height - 15
TitleLine(1).Y2 = Title.Height - 15
End Sub
Private Sub iT_GotFocus(Index As Integer)
iT(Index).SelStart = 0
iT(Index).SelLength = Len(iT(Index).Text)
End Sub
Private Sub Scroll_Change()
ScrollInner.Top = -Scroll.Value
End Sub
Private Sub Scroll_Scroll()
Call Scroll_Change
End Sub
Public Sub Prepare(inputs() As Double, inputCaptions() As String)
Dim variable As Integer, variableCycle As Integer
variable = Asc("a")
For X = 0 To UBound(inputs)
If iT.UBound < X Then
Load iL(X)
Load iT(X)
iT(X).Top = iT(X - 1).Top + iT(X - 1).Height + 120
iL(X).Top = iT(X).Top + 30
End If
iT(X).Visible = True
iT(X).Text = "0"
iT(X).TabIndex = X
iL(X).Visible = True
iL(X).Caption = inputCaptions(X) & " ="
Next X
ScrollInner.Height = iT(iT.UBound).Top + iT(iT.UBound).Height
Scroll.Height = ScrollOuter.Height
Scroll.Max = ScrollInner.Height - ScrollOuter.Height
If Scroll.Max < 0 Then Scroll.Max = 0
Scroll.SmallChange = 90
Scroll.LargeChange = ScrollOuter.Height - 240
ReDim ChangedInputs(LBound(inputs) To UBound(inputs))
ReDim OriginalInputs(LBound(inputs) To UBound(inputs))
For X = LBound(inputs) To UBound(inputs)
ChangedInputs(X) = inputs(X)
OriginalInputs(X) = inputs(X)
Next X
End Sub
Public Function Extract(ByRef inputs() As Double) As Boolean
If Canceled Then
inputs = OriginalInputs
Else
inputs = ChangedInputs
End If
Unload Me
Extract = Not Canceled
End Function
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -