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

📄 apiwindowdispenser.cls

📁 几个不错的VB例子
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "ApiWindowDispenser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Private mIsCommonContolsInitialsed As Boolean

'\\ Creating new windows.....
Private Declare Function CreateWindowExApi Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long

Public Function CreateWindow(ByVal ExtendedWindowStyle As Long, ByVal TheClass As APIWndClass, ByVal WindowName As String, ByVal WindowStyle As Long, ByVal xPos As Long, ByVal yPos As Long, ByVal Width As Long, ByVal Height As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInst As Long, ByVal lpCreateStruct As Long) As ApiWindow

Dim wndThis As ApiWindow
Dim lRet As Long

lRet = CreateWindowExApi(ExtendedWindowStyle, TheClass.lpszClassName, WindowName, WindowStyle, xPos, yPos, Width, Height, hWndParent, hMenu, hInst, lpCreateStruct)
If lRet > 0 And Err.LastDllError = 0 Then
    Set wndThis = New ApiWindow
    wndThis.hwnd = lRet
Else
    Call ReportError(Err.LastDllError, "ApiWindowDispenser:CreateWindow", GetLastSystemError)
End If

End Function

⌨️ 快捷键说明

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