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

📄 newmodel.frm

📁 计算机CAD图纸管理和预览
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form newmodel 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "新机型登记"
   ClientHeight    =   5430
   ClientLeft      =   3585
   ClientTop       =   3150
   ClientWidth     =   8490
   Icon            =   "newmodel.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5430
   ScaleWidth      =   8490
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFFF&
      Height          =   1980
      Index           =   5
      Left            =   360
      TabIndex        =   15
      Top             =   2520
      Width           =   7575
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFFF&
      Height          =   300
      Index           =   4
      Left            =   5280
      TabIndex        =   14
      Top             =   1005
      Width           =   2655
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFFF&
      Height          =   300
      Index           =   3
      Left            =   5280
      TabIndex        =   13
      Top             =   430
      Width           =   2655
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFFF&
      Height          =   300
      Index           =   2
      Left            =   1320
      TabIndex        =   12
      Top             =   1600
      Width           =   2655
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFFF&
      Height          =   300
      Index           =   1
      Left            =   1320
      TabIndex        =   11
      Top             =   1005
      Width           =   2655
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFFF&
      Height          =   300
      Index           =   0
      Left            =   1320
      TabIndex        =   2
      Top             =   430
      Width           =   2655
   End
   Begin VB.CommandButton CancelButton 
      Cancel          =   -1  'True
      Caption         =   "退出"
      Height          =   375
      Left            =   6480
      TabIndex        =   1
      Top             =   4920
      Width           =   1215
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   375
      Left            =   5040
      TabIndex        =   0
      Top             =   4920
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Height          =   4575
      Left            =   120
      TabIndex        =   3
      Top             =   120
      Width           =   8055
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   300
         Left            =   5160
         TabIndex        =   16
         Top             =   1500
         Width           =   2655
         _ExtentX        =   4683
         _ExtentY        =   529
         _Version        =   393216
         Format          =   21168129
         CurrentDate     =   38973
      End
      Begin VB.Label Label7 
         Caption         =   "备注"
         Height          =   375
         Left            =   240
         TabIndex        =   10
         Top             =   2160
         Width           =   975
      End
      Begin VB.Label Label6 
         Caption         =   "开发年月"
         Height          =   375
         Left            =   4200
         TabIndex        =   9
         Top             =   1560
         Width           =   1575
      End
      Begin VB.Label Label5 
         Caption         =   "项目组员"
         Height          =   375
         Left            =   4200
         TabIndex        =   8
         Top             =   960
         Width           =   1455
      End
      Begin VB.Label Label4 
         Caption         =   "申请人"
         Height          =   375
         Left            =   4200
         TabIndex        =   7
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label Label3 
         Caption         =   "申请图号"
         Height          =   375
         Left            =   240
         TabIndex        =   6
         Top             =   1560
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "机型名称"
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   960
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "机型代号"
         Height          =   375
         Left            =   240
         TabIndex        =   4
         Top             =   360
         Width           =   975
      End
   End
End
Attribute VB_Name = "newmodel"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Form_Load()
   
    MakeCenter newmodel

    Text1(0).Text = Empty
    Text1(1).Text = Empty
    Text1(2).Text = Empty
    Text1(3).Text = Empty
    Text1(4).Text = Empty
    Text1(5).Text = Empty
    DTPicker1.Value = Date
End Sub


Private Sub CancelButton_Click()
  Unload Me
  
End Sub
Private Sub OKButton_Click()
    
    If Text1(0).Text = Empty Then
      MsgBox "机型代号不能为空", vbInformation, "提醒"
      Exit Sub
    End If
    
    If Text1(1).Text = Empty Then
        MsgBox "机型名称不能为空", vbInformation, "提醒"
        Exit Sub
    End If
    If Text1(2).Text = Empty Then
        MsgBox "申请图号不能为空", vbInformation, "提醒"
        Exit Sub
    End If
    If Text1(3).Text = Empty Then
        MsgBox "申请人不能为空", vbInformation, "提醒"
        Exit Sub
    End If
    
    Dim i As Integer
    For i = 1 To 主菜单.mainGrid.Rows - 1
        If Trim(Text1(0).Text) = 主菜单.mainGrid.TextMatrix(i, 2) Then
          MsgBox Trim(Text1(0).Text) & "该机型代号已被申请", vbInformation, "提醒"
          Exit Sub
        End If
        If Trim(Text1(2).Text) = 主菜单.mainGrid.TextMatrix(i, 4) Then
            MsgBox Trim(Text1(2).Text) & "该图号已被申请", vbInformation, "提醒"
            Exit Sub
        End If
        
    Next i
    
    主菜单.modelbar.Buttons("save").Enabled = True
    主菜单.mainGrid.AddItem "", 1
    
    主菜单.mainGrid.TextMatrix(1, 2) = Trim(Text1(0).Text)
    主菜单.mainGrid.TextMatrix(1, 3) = Trim(Text1(1).Text)
    主菜单.mainGrid.TextMatrix(1, 4) = Trim(Text1(2).Text)
    主菜单.mainGrid.TextMatrix(1, 5) = Trim(Text1(3).Text)
    主菜单.mainGrid.TextMatrix(1, 6) = Trim(Text1(4).Text)
    主菜单.mainGrid.TextMatrix(1, 7) = DTPicker1.Value
    主菜单.mainGrid.TextMatrix(1, 8) = Trim(Text1(5).Text)
    主菜单.mainGrid.Row = 1
    Dim n As Integer
    For n = 1 To 主菜单.mainGrid.Cols - 1
        主菜单.mainGrid.Col = n
        主菜单.mainGrid.CellBackColor = &HFFFF&
    Next n
    Unload Me



End Sub


⌨️ 快捷键说明

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