| 
    
     |  | ウィンドサイズを求めて,タイトルバーサイズ分大きくし 表示位置を上にずらして「見えなく」するコードです。
 
 Dim xx, yy As Integer
 Type RECT
 x1 As Long
 y1 As Long
 x2 As Long
 y2 As Long
 End Type
 
 Declare Function GetDesktopWindow Lib "User32" () As Long
 Declare Function GetWindowRect Lib "User32" _
 (ByVal hWnd As Long, rectangle As RECT) As Long
 '---------------------------------------------------------------
 Function GetScreenResolution() As String
 Dim R As RECT
 Dim hWnd As Long
 Dim RetVal As Long
 hWnd = GetDesktopWindow()
 RetVal = GetWindowRect(hWnd, R)
 'GetScreenResolution = (R.x2 - R.x1) & "x" & (R.y2 - R.y1)
 xx = R.x2 - R.x1
 yy = R.y2 - R.y1
 End Function
 
 Sub TEST_SET()
 Call GetScreenResolution
 Debug.Print xx, yy
 With Application
 .Height = yy * 0.75 + 20
 .Width = xx * 0.75 + 0
 .Top = -20
 .Left = 0
 .CommandBars("Worksheet Menu Bar").Enabled = False
 End With
 MsgBox "ねっ!"
 With Application
 .Height = yy * 0.75 + 30
 .Width = xx * 0.75 + 0
 .Top = 0
 .Left = 0
 .CommandBars("Worksheet Menu Bar").Enabled = True
 End With
 End Sub
 
 
 |  |