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

📄 frmchild.frm

📁 个人VB学习源码精选,自己学习时的一些编程小程序,希望对大家有帮助
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmChild 
   Caption         =   "Child Form"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   630
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   Begin VB.TextBox Text1 
      Height          =   1695
      Left            =   0
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   0
      Top             =   0
      Width           =   1455
   End
   Begin VB.Menu mnuFile 
      Caption         =   "&File"
      Begin VB.Menu mnuFileSave 
         Caption         =   "&Save"
      End
      Begin VB.Menu mnuFileExit 
         Caption         =   "E&xit"
      End
   End
   Begin VB.Menu mnuWindow 
      Caption         =   "&Window"
      WindowList      =   -1  'True
      Begin VB.Menu mnuWindowArrange 
         Caption         =   "&Cascade"
         Index           =   0
      End
      Begin VB.Menu mnuWindowArrange 
         Caption         =   "Tile&Horizontal"
         Index           =   1
      End
      Begin VB.Menu mnuWindowArrange 
         Caption         =   "Tile&VerticaL"
         Index           =   2
      End
      Begin VB.Menu mnuWindowArrange 
         Caption         =   "&Arrange Icons"
         Index           =   3
      End
      Begin VB.Menu mnuWindowArrange 
         Caption         =   "-"
         Index           =   4
      End
      Begin VB.Menu mnuWindowArrange 
         Caption         =   "&New Child"
         Index           =   5
      End
      Begin VB.Menu mnuWindowArrange 
         Caption         =   "Mo&dal"
         Index           =   6
      End
      Begin VB.Menu mnuWindowArrange 
         Caption         =   "Model&less"
         Index           =   7
      End
   End
End
Attribute VB_Name = "frmChild"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
    MDIForm1.StatusBar1.Panels(1).Text = ""
    Text1 = "This is instance #" & Me.Tag
    Me.Caption = "Child Form" & Me.Tag
    MDIForm1.StatusBar1.Panels(1).Text = "Child form #" & Me.Tag
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    Dim msg, docTitle, saveChange
    If DocState(Me.Tag) Then
        docTitle = Me.Caption
        msg = "Document has changed. Save Changes?"
        saveChange = MsgBox(msg, vbExclamation Or vbYesNoCancel)
        Select Case saveChange
            Case vbCancel
                Cancel = True
            Case vbYes
                FileSave
                Cancel = False
            Case vbNo
                Cancel = False
        End Select
    End If
End Sub

Private Sub Form_Resize()
    Text1.Height = ScaleHeight
    Text1.Width = ScaleWidth
End Sub

Private Sub mnuFileExit_Click()
    Quit
End Sub

Private Sub mnuFileSave_Click()
    DocState(Me.Tag) = False
End Sub

Private Sub mnuWindowArrange_Click(Index As Integer)
    Select Case Index
        Case 0: MDIForm1.Arrange vbCascade
        Case 1: MDIForm1.Arrange vbTileHorizontal
        Case 2: MDIForm1.Arrange vbTileVertical
        Case 3: MDIForm1.Arrange vbArrangeIcons
        Case 5: DisplayNewChild
        Case 6: DisplayModal
        Case 7: DisplayModeless
    End Select
End Sub

Private Sub Text1_Change()
    DocState(Me.Tag) = True
End Sub

Private Sub Text1_DblClick()
    PopupMenu mnuWindow, vbRightButton
End Sub


⌨️ 快捷键说明

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