VBA这一段代码是什么意思!!特别是首句,请懂VBA的朋友帮忙解答一下,谢谢!
PrivateSubUserForm_Initialize()DimhWndFormAsLongDimiStyleAsLong,hMenuAsLongIfVal(Appl...
Private Sub UserForm_Initialize()
Dim hWndForm As Long
Dim iStyle As Long, hMenu As Long
If Val(Application.VERSION) < 9 Then
hWndForm = FindWindow("ThunderXFrame", Me.Caption) 'XL97
Else
hWndForm = FindWindow("ThunderDFrame", Me.Caption) 'XL2000
End If
iStyle = GetWindowLong(hWndForm, GWL_STYLE)
iStyle = iStyle And Not WS_CAPTION '无边框样式
SetWindowLong hWndForm, GWL_STYLE, iStyle
DrawMenuBar hWndForm
Me.Width = Application.Width + 5
Me.Height = Application.Height + 5
Me.Top = 0
Me.Left = 0
End Sub 展开
Dim hWndForm As Long
Dim iStyle As Long, hMenu As Long
If Val(Application.VERSION) < 9 Then
hWndForm = FindWindow("ThunderXFrame", Me.Caption) 'XL97
Else
hWndForm = FindWindow("ThunderDFrame", Me.Caption) 'XL2000
End If
iStyle = GetWindowLong(hWndForm, GWL_STYLE)
iStyle = iStyle And Not WS_CAPTION '无边框样式
SetWindowLong hWndForm, GWL_STYLE, iStyle
DrawMenuBar hWndForm
Me.Width = Application.Width + 5
Me.Height = Application.Height + 5
Me.Top = 0
Me.Left = 0
End Sub 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询