Live-Forum - Die aktuellen Beiträge
Datum
Titel
28.03.2024 21:12:36
28.03.2024 18:31:49
Anzeige
Archiv - Navigation
476to480
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
476to480
476to480
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

UserForm gesamter Bildschirm

UserForm gesamter Bildschirm
28.08.2004 11:04:52
Philipp
Hallo,
ich möcht meine UserForm über den gesamten Bildschirm haben, habe schon versucht
siehe Makro.
Jedoch ist bei mir die UserForm links noch etwas Frei und recht oben sehe
ich nicht das Kreuz in der Leiste.
Geht das auch das ich "Unten" die gesamte Office Leiste abdecken kann ?
Gruß
Philipp
Hier mein Makro:

Private Sub UserForm_Initialize()
With UserForm1
.Height = Application.Height
.Width = Application.Width
End With
End Sub



6
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: UserForm gesamter Bildschirm
28.08.2004 11:28:11
Nepumuk
Hallo Philipp,
so geht's:


Option Explicit
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As LongByVal nIndex As LongAs Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As LongAs Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As LongByVal hdc As LongAs Long
Private Sub UserForm_Activate()
    With Me
        .StartUpPosition = 0
        .Top = 0
        .Left = 0
        .Height = GetDeviceCaps(GetDC(0&), 8)
        .Width = GetDeviceCaps(GetDC(0&), 10)
    End With
    ReleaseDC 0, GetDC(0&)
End Sub


Gruß
Nepumuk
Anzeige
Danke Super
28.08.2004 12:16:52
Philipp
Hallo Nepumuk,
funktioniert SUPER, DANKE.
Gruss
Philipp
Hallo Kann man noch...
28.08.2004 12:22:58
Philipp
Hallo Nepumuk,
kann man noch etwas erweitern das man nicht verschieben kann ?
Gruss Philipp
AW: Hallo Kann man noch...
28.08.2004 12:30:32
Nepumuk
Hallo Philipp,
man kann, frau auch:


Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As StringByVal lpWindowName As StringAs Long
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As LongByVal bRevert As LongAs Long
Private Declare Function DeleteMenu Lib "user32" (ByVal hMenu As LongByVal nPosition As LongByVal wFlags As LongAs Long
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, &HF010, &H0
    End If
End Sub


Gruß
Nepumuk
Anzeige
AW: Hallo Kann man noch...
28.08.2004 15:00:22
philipp
Hallo Nepumuk,
herzlichen Dank.
Super funktioniert!
Gruss Philipp
AW: Hallo Kann man noch...
Ulf
Option Explicit
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long

Private Sub UserForm_Activate()
With Me
.StartUpPosition = 0
.Top = -25
.Left = 0
.Height = GetDeviceCaps(GetDC(0&), 8)+25
.Width = GetDeviceCaps(GetDC(0&), 10)
End With
ReleaseDC 0, GetDC(0&)
End Sub

Ulf
Anzeige

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige