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

📄 frmoutput.frm

📁 This ActiveX control and Demo will allow you to dock your toolbars/forms to a mdiform much in the wa
💻 FRM
字号:
VERSION 5.00
Object = "{AFC277E4-A825-11D4-ABF8-502B61C10000}#2.0#0"; "Docking.ocx"
Begin VB.Form frmOutput 
   BorderStyle     =   5  'Sizable ToolWindow
   ClientHeight    =   2190
   ClientLeft      =   60
   ClientTop       =   60
   ClientWidth     =   5775
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2190
   ScaleWidth      =   5775
   ShowInTaskbar   =   0   'False
   Begin Docking.FormDocker FormDocker1 
      Align           =   1  'Align Top
      Height          =   285
      Left            =   0
      Top             =   0
      Width           =   5775
      _ExtentX        =   10186
      _ExtentY        =   503
      Caption         =   "Output"
   End
   Begin VB.PictureBox picDrag 
      Align           =   1  'Align Top
      BorderStyle     =   0  'None
      Height          =   50
      Left            =   0
      ScaleHeight     =   45
      ScaleWidth      =   5775
      TabIndex        =   1
      Top             =   285
      Width           =   5775
   End
   Begin VB.TextBox txtOutput 
      Height          =   975
      Left            =   0
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      TabIndex        =   0
      Top             =   360
      Width           =   4335
   End
End
Attribute VB_Name = "frmOutput"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit









Private Sub Form_DblClick()
FormDocker1.SnapForm

End Sub

Private Sub Form_Load()
'm_clsDocking.m_Picbox = fMainform.picOutput
FormDocker1.FormInitialize frmOutput, fMainform, fMainform.picOutput, dkTextMode
'FormDocker1.hwndPicbox = fMainform.picOutput.hWnd

End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
FormDocker1.DragForm Button
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
'reset this form's owner to prevent a crash
    Call FormDocker1.ResetOwner
End Sub


Private Sub Form_Resize()
On Error Resume Next
'If fMainform.WindowState <> vbMinimized Then
    If Me.WindowState <> vbMinimized Then
        'Update the stored Values
            FormDocker1.StoreFormDimensions frmOutput
            Call FormResize
    End If


End Sub


Private Sub FormDocker1_FormDocked()
Dim Control As Control
'FormDocker1.hidetitlebar

'For Each Control In Me.Controls
'    If Not TypeOf Control Is PictureBox And Not Control Is FormDocker1 Then
'        Control.Top = 25
'    End If
'Next Control
FormDocker1.Align = vbAlignLeft
FormDocker1.Mode = dkLineMode
picDrag.Visible = True
picDrag.Top = 0
Call FormResize

End Sub

Private Sub FormDocker1_FormUnDocked()
Dim Control As Control
'FormDocker1.showtitlebar

'For Each Control In Me.Controls
'    If Not TypeOf Control Is PictureBox And Not Control Is FormDocker1 Then
'        Control.Top = FormDocker1.Height + 50
'    End If
'Next Control
FormDocker1.Align = vbAlignTop
FormDocker1.Mode = dkTextMode

picDrag.Visible = False
FormDocker1.Top = 0
Call FormResize
End Sub



Private Sub picDrag_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
FormDocker1.DragDirection dkDirTop
'If FormDocker1.Docked = True Then
'    ReleaseCapture
'    SendMessage fMainform.picOutput.hWnd, WM_NCLBUTTONDOWN, 15, ByVal 0&
'End If
End Sub

Private Sub picDrag_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
FormDocker1.ChangeCursor picDrag, dkTopBottom

End Sub

Private Sub FormResize()
            If FormDocker1.Align = vbAlignTop Then
                txtOutput.Move 20, FormDocker1.Height + 25, Me.Width - 150, Me.Height - FormDocker1.Height - 150
            ElseIf FormDocker1.Align = vbAlignLeft Then
                txtOutput.Move FormDocker1.Width + 25, picDrag.Height + 25, Me.Width - 325, Me.Height - picDrag.Height - 180
            End If
End Sub

⌨️ 快捷键说明

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