VERSION 5.00 Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} splash Caption = "UserForm1" ClientHeight = 4020 ClientLeft = 45 ClientTop = 330 ClientWidth = 8100 OleObjectBlob = "splash.frx":0000 StartUpPosition = 1 'CenterOwner End Attribute VB_Name = "splash" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False #If VBA7 Then Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Declare PtrSafe Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long Private Declare PtrSafe Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long Private Declare PtrSafe Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare PtrSafe Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare PtrSafe Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long #Else Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Declare Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long #End If Private Const GWL_STYLE As Long = (-16) Private Const GWL_EXSTYLE = (-20) Private Const WS_CAPTION As Long = &HC00000 Private Const WS_EX_DLGMODALFRAME = &H1& Private switch As Boolean Private Sub Image1_Click() End Sub Private Sub UserForm_Initialize() Dim IStyle As Long Dim hWnd As Long hWnd = FindWindow("ThunderDFrame", Me.Caption) IStyle = GetWindowLong(hWnd, GWL_STYLE) IStyle = IStyle And Not WS_CAPTION SetWindowLong hWnd, GWL_STYLE, IStyle DrawMenuBar hWnd IStyle = GetWindowLong(hWnd, GWL_EXSTYLE) And Not WS_EX_DLGMODALFRAME SetWindowLong hWnd, GWL_EXSTYLE, IStyle End Sub ' 经过优化改写,勉强够用了 Private Sub UserForm_Activate() Me.text1 = Me.text1 + "功能:按面积排列" Unload VBA_FORM ActiveWindow.Refresh: Application.Refresh DoEvents Tools.按面积排列 50 'Close the window. Unload Me End Sub