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

📄 屏敝文本框菜单和用户定义标题栏.frm

📁 个人VB学习源码精选,自己学习时的一些编程小程序,希望对大家有帮助
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   ClientHeight    =   2880
   ClientLeft      =   60
   ClientTop       =   60
   ClientWidth     =   3975
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   ScaleHeight     =   192
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   265
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox Text1 
      Height          =   1575
      Left            =   0
      MultiLine       =   -1  'True
      TabIndex        =   1
      Text            =   "屏敝文本框菜单和用户定义标题栏.frx":0000
      Top             =   480
      Width           =   3975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "结束(&E)"
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   2160
      Width           =   1575
   End
   Begin VB.Image Image1 
      Height          =   405
      Left            =   0
      Picture         =   "屏敝文本框菜单和用户定义标题栏.frx":0083
      Top             =   0
      Width           =   3960
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    prevWndProc(0) = GetWindowLong(Me.hwnd, GWL_WNDPROC)
    SetWindowLong Me.hwnd, GWL_WNDPROC, AddressOf WndProcForForm1
    
    prevWndProc(1) = GetWindowLong(Text1.hwnd, GWL_WNDPROC)
    SetWindowLong Text1.hwnd, GWL_WNDPROC, AddressOf WndProcForText1
End Sub


Private Sub Form_Unload(Cancel As Integer)
    SetWindowLong Me.hwnd, GWL_WNDPROC, prevWndProc(0)
    SetWindowLong Me.hwnd, GWL_WNDPROC, prevWndProc(1)
End Sub

Function IsInImage(ByVal X As Integer, ByVal Y As Integer)
    Dim r1 As RECT, r2 As RECT
    Dim border As Integer
    
    IsInImage = False
    GetWindowRect Me.hwnd, r1
    GetClientRect Me.hwnd, r2
    border = (r1.Right - r1.Left - r2.Right) / 2
    
    If X > r1.Left + border + Image1.Left And _
       X < r1.Left + border + Image1.Left + Image1.Width And _
       Y > r1.Top + border + Image1.Top And _
       Y < r1.Top + border + Image1.Top + Image1.Height Then
       
       IsInImage = True
    End If
End Function

⌨️ 快捷键说明

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