Ich muss mal wieder euer Wissen in anspruch nehemen.
Und zwar. Ist es möglich mit VBA die Taskleiste auszublenden? Also ich möchte das ein User Form wenns geöffnet wird automatisch die Taskleiste ausblendet?
Über jede Hilfe wie immer froh
MfG
Dirk
Option Explicit
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex 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 GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Const MF_BYCOMMAND = &H0
Private Const SC_MOVE = &HF010
Private Const SM_CXSCREEN = 0
Private Const SM_CYSCREEN = 1
Public Function GetXScreenResolution()
GetXScreenResolution = GetSystemMetrics(SM_CXSCREEN)
End Function
Public Function GetYScreenResolution()
GetYScreenResolution = GetSystemMetrics(SM_CYSCREEN)
End Function
Private Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
With Me
.Top = 0
.Left = 0
.Width = GetXScreenResolution
.Height = GetYScreenResolution
End With
End Sub
Private Sub UserForm_Activate()
Dim hwndForm As Long, hwndMenu As Long
hwndForm = FindWindow(vbNullString, Me.Caption)
If hwndForm <> 0 Then
hwndMenu = GetSystemMenu(hwndForm, 0)
If hwndMenu <> 0 Then DeleteMenu hwndMenu, SC_MOVE, MF_BYCOMMAND
End If
End Sub