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

📄 newmv.frm

📁 I. A brief description of the aiNet application. II. How to set up the aiNet on your system. III. So
💻 FRM
字号:
VERSION 4.00
Begin VB.Form NewMV 
   Caption         =   "New Model Vector ..."
   ClientHeight    =   3492
   ClientLeft      =   1560
   ClientTop       =   2340
   ClientWidth     =   4332
   Height          =   3876
   Left            =   1512
   LinkTopic       =   "Form1"
   ScaleHeight     =   3492
   ScaleWidth      =   4332
   Top             =   2004
   Width           =   4428
   Begin VB.CommandButton OkBtn 
      Caption         =   "OK"
      Default         =   -1  'True
      Height          =   372
      Left            =   3120
      TabIndex        =   10
      Top             =   840
      Width           =   972
   End
   Begin VB.Frame Frame2 
      Caption         =   "New Model Vector Data"
      Height          =   852
      Left            =   240
      TabIndex        =   12
      Top             =   1920
      Width           =   3852
      Begin VB.TextBox Hole 
         Height          =   288
         Left            =   3000
         ReadOnly        =   -1  'True
         TabIndex        =   14
         Top             =   360
         Width           =   612
      End
      Begin VB.TextBox YC 
         Height          =   288
         Left            =   1560
         TabIndex        =   9
         Top             =   360
         Width           =   612
      End
      Begin VB.TextBox XC 
         Height          =   288
         Left            =   480
         TabIndex        =   7
         Top             =   360
         Width           =   612
      End
      Begin VB.Label Label4 
         Alignment       =   1  'Right Justify
         Caption         =   "Is hole?"
         Height          =   252
         Left            =   2160
         TabIndex        =   13
         Top             =   360
         Width           =   732
      End
      Begin VB.Label Label3 
         Alignment       =   1  'Right Justify
         Caption         =   "&Y:"
         Height          =   252
         Left            =   1200
         TabIndex        =   8
         Top             =   360
         Width           =   252
      End
      Begin VB.Label Label1 
         Alignment       =   1  'Right Justify
         Caption         =   "&X:"
         Height          =   252
         Left            =   120
         TabIndex        =   6
         Top             =   360
         Width           =   252
      End
   End
   Begin VB.TextBox Index 
      Height          =   288
      Left            =   1680
      TabIndex        =   5
      Top             =   840
      Width           =   732
   End
   Begin VB.CommandButton Cancel 
      Cancel          =   -1  'True
      Caption         =   "Cancel"
      Height          =   372
      Left            =   3120
      TabIndex        =   3
      Top             =   360
      Width           =   972
   End
   Begin VB.OptionButton Append 
      Caption         =   "&Append"
      Height          =   252
      Left            =   480
      TabIndex        =   2
      Top             =   1320
      Width           =   1452
   End
   Begin VB.OptionButton Overwrite 
      Caption         =   "&Overwrite"
      Height          =   252
      Left            =   480
      TabIndex        =   1
      Top             =   960
      Width           =   1452
   End
   Begin VB.OptionButton Insert 
      Caption         =   "&Insert"
      Height          =   252
      Left            =   480
      TabIndex        =   0
      Top             =   600
      Width           =   972
   End
   Begin VB.Frame Frame1 
      Caption         =   "Method of Insetion"
      Height          =   1572
      Left            =   240
      TabIndex        =   11
      Top             =   240
      Width           =   2652
      Begin VB.Label IndexLabel 
         Alignment       =   2  'Center
         Caption         =   "at i&ndex"
         Height          =   252
         Left            =   1320
         TabIndex        =   4
         Top             =   360
         Width           =   732
      End
   End
   Begin VB.Label Label5 
      Caption         =   "Be careful when entering numbers. If entered string holds invalid characters, the program might crash!"
      Height          =   492
      Left            =   240
      TabIndex        =   15
      Top             =   2880
      Width           =   3852
   End
End
Attribute VB_Name = "NewMV"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Private X As Single
Private Y As Single

Private Function CalcHole() As Integer
    X = CSng(XC)
    If X < -1 Or X > 1 Then
        MsgBox ("X must lie within [-1 ...1]!")
        Hole = "Error"
        CalcHole = 0
    Else
        Y = CSng(YC)
        If Y < -1 Or Y > 1 Then
            MsgBox ("The number must lie within [-1 ...1]!")
            Hole = "Error"
            CalcHole = 0
        Else
            r = Sqr(X * X + Y * Y)
            If r > 0.7 Then
                Hole = "No (0)"
            Else
                Hole = "Yes (1)"
            End If
            CalcHole = 1
        End If
    End If
End Function

Private Sub Append_Click()
    index.Enabled = False
    indexLabel.Enabled = False
End Sub

Private Sub Cancel_Click()
    MainForm.Ret = 0
    Hide
End Sub

Private Sub Insert_Click()
    index.Enabled = True
    indexLabel.Enabled = True
End Sub

Private Sub OKBtn_Click()
    If CalcHole = 1 Then
        'MainForm.Par2 = CLng(index)
        MainForm.X = X
        MainForm.Y = Y
        MainForm.Ret = 1
        Hide
    End If
End Sub

Private Sub Overwrite_Click()
    Insert_Click
End Sub

Private Sub XC_LostFocus()
    CalcHole
End Sub

Private Sub YC_LostFocus()
    CalcHole
End Sub

⌨️ 快捷键说明

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