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

📄 picfrm.frm

📁 GDI 图形处理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form PicFrm 
   AutoRedraw      =   -1  'True
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "Picture Form"
   ClientHeight    =   3180
   ClientLeft      =   10725
   ClientTop       =   255
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3180
   ScaleWidth      =   4680
   ShowInTaskbar   =   0   'False
End
Attribute VB_Name = "PicFrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Const SWP_DRAWFRAME = &H20
Const SWP_FRAMECHANGED = &H20        '  The frame changed: send WM_NCCALCSIZE

Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type
Const MF_BYPOSITION = &H400&
Const MF_REMOVE = &H1000&
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _
        ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, _
        ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As _
        Long, lpRECT As RECT) As Long
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long


Private Sub Form_Activate()
On Error GoTo err

If m_PicfrmW <> m_CapfrmW Or m_PicfrmH <> m_CapfrmH Then

    m_PicfrmW = m_CapfrmW
    m_PicfrmH = m_CapfrmH
    SetWindowPos Me.hwnd, HWND_TOPMOST, 10, 300, m_PicfrmW, m_PicfrmH, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_DRAWFRAME 'Or SWP_NOSIZE Or SWP_NOMOVE
End If
err:
End Sub

Private Sub Form_Load()
Dim hSysMenu As Long, nCnt As Long
m_PicfrmShow = True
m_Picfrmhwnd = Me.hwnd
    hSysMenu = GetSystemMenu(Me.hwnd, False)

    If hSysMenu Then
        ' Get System menu's menu count
        nCnt = GetMenuItemCount(hSysMenu)
        If nCnt Then
            ' Menu count is based on 0 (0, 1, 2, 3...)
            RemoveMenu hSysMenu, nCnt - 1, MF_BYPOSITION Or MF_REMOVE
            RemoveMenu hSysMenu, nCnt - 2, MF_BYPOSITION Or MF_REMOVE ' Remove the seperator
            DrawMenuBar Me.hwnd
        End If
    End If
SetWindowPos Me.hwnd, HWND_TOPMOST, m_DisplayW, 0, m_PicfrmW, m_PicfrmH, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_DRAWFRAME 'Or SWP_NOSIZE Or SWP_NOMOVE
End Sub


Private Sub Form_Unload(Cancel As Integer)
m_PicfrmShow = False
End Sub

⌨️ 快捷键说明

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