⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rescale.frm

📁 the attached file contains artifitial neural network code
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Rescale 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Network dimensions"
   ClientHeight    =   2775
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3615
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "Rescale.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2775
   ScaleWidth      =   3615
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.PictureBox Title 
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      Height          =   615
      Left            =   0
      ScaleHeight     =   615
      ScaleWidth      =   3495
      TabIndex        =   10
      Top             =   0
      Width           =   3495
      Begin VB.Label Label 
         BackColor       =   &H80000005&
         Caption         =   "Specify the desired network dimensions."
         ForeColor       =   &H80000008&
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   11
         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.TextBox iT 
      Height          =   285
      Index           =   2
      Left            =   1560
      TabIndex        =   2
      Top             =   1440
      Width           =   1815
   End
   Begin VB.TextBox iT 
      Height          =   285
      Index           =   1
      Left            =   1560
      TabIndex        =   1
      Top             =   1080
      Width           =   1815
   End
   Begin VB.TextBox iT 
      Height          =   285
      Index           =   0
      Left            =   1560
      TabIndex        =   0
      Top             =   720
      Width           =   1815
   End
   Begin VB.CommandButton Command 
      Caption         =   "OK"
      Default         =   -1  'True
      Height          =   375
      Index           =   0
      Left            =   120
      TabIndex        =   3
      Top             =   2280
      Width           =   1575
   End
   Begin VB.CommandButton Command 
      Cancel          =   -1  'True
      Caption         =   "Cancel"
      Height          =   375
      Index           =   1
      Left            =   1920
      TabIndex        =   4
      Top             =   2280
      Width           =   1575
   End
   Begin VB.Label Label3 
      Caption         =   "This will reset all current thresholds and weights."
      Height          =   495
      Left            =   660
      TabIndex        =   9
      Top             =   1800
      Width           =   2715
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Note:"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   195
      Left            =   120
      TabIndex        =   8
      Top             =   1800
      Width           =   435
   End
   Begin VB.Label iL 
      Alignment       =   1  'Right Justify
      Caption         =   "output nodes:"
      Height          =   255
      Index           =   2
      Left            =   120
      TabIndex        =   7
      Top             =   1470
      Width           =   1335
   End
   Begin VB.Label iL 
      Alignment       =   1  'Right Justify
      Caption         =   "hidden nodes:"
      Height          =   255
      Index           =   1
      Left            =   120
      TabIndex        =   6
      Top             =   1110
      Width           =   1335
   End
   Begin VB.Label iL 
      Alignment       =   1  'Right Justify
      Caption         =   "input nodes: "
      Height          =   255
      Index           =   0
      Left            =   120
      TabIndex        =   5
      Top             =   750
      Width           =   1335
   End
End
Attribute VB_Name = "Rescale"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private OriginalInputs As Integer
Private OriginalHiddens As Integer
Private OriginalOutputs As Integer
Private Canceled As Boolean

Private Sub Command_Click(Index As Integer)
    Select Case Index
    Case 0:
        If IsNumeric(iT(0).Text) And IsNumeric(iT(1).Text) And IsNumeric(iT(2).Text) Then
            If iT(0).Text < 1 Or iT(1).Text < 1 Or iT(2).Text < 1 Then
                MsgBox "One or more of the layers is empty. Please insert only valid dimensions.", vbExclamation
                Exit Sub
            End If
        Else
            MsgBox "One or more of the dimensions is not numeric. Please insert only valid dimensions.", vbExclamation
            Exit Sub
        End If
        Canceled = False
    Case 1:
        Canceled = True
    End Select
    Me.Hide
End Sub

Public Sub Prepare(inputs As Integer, hiddens As Integer, outputs As Integer)
    OriginalInputs = inputs
    OriginalHiddens = hiddens
    OriginalOutputs = outputs
    iT(0).Text = OriginalInputs
    iT(1).Text = OriginalHiddens
    iT(2).Text = OriginalOutputs
End Sub

Public Function Extract(ByRef inputs As Integer, ByRef hiddens As Integer, ByRef outputs As Integer) As Boolean
    If Canceled Then
        inputs = OriginalInputs
        hiddens = OriginalHiddens
        outputs = OriginalOutputs
    Else
        inputs = iT(0).Text
        hiddens = iT(1).Text
        outputs = iT(2).Text
    End If
    Unload Me
    Extract = Not Canceled
End Function

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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -