vb6.0/vba [vb6.0/vba] 창 최대화 - Maximize the window
페이지 정보
본문
Private Const SW_MAXIMIZE As Long = 3
#If VBA7 Then
Private Declare PtrSafe Function ShowWindow Lib "USER32" _
(ByVal hwnd As LongPtr, ByVal nCmdShow As Long) As Boolean
Private Declare PtrSafe Function FindWindow Lib "USER32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr
#Else
Private Declare Function ShowWindow Lib "USER32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Boolean
Private Declare Function FindWindow Lib "USER32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
#End If
Public Sub MaximizeWindow(ByVal WindowTitle As String)
#If VBA7 Then
Dim hwnd As LongPtr
#Else
Dim hwnd As Long
#End If
hwnd = FindWindow(vbNullString, WindowTitle)
If hwnd <> 0 Then
Call ShowWindow(hwnd, SW_MAXIMIZE)
End If
End Sub
- 이전글[vb6.0/vba] Collection보다 기능이 많은 Scripting.Dictionary 를 이용한 통계내기 20.02.21
- 다음글[vb6.0/vba] [Windows API] - FindWindow 20.02.20
댓글목록
등록된 댓글이 없습니다.