Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
1336to1340
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
Inhaltsverzeichnis

Leiste ausblenden

Leiste ausblenden
17.11.2013 09:56:08
Tom
Guten Morgen,
ich habe eine Datei, die ich per "ganzer Bildschirm" auf einen Beamer präsentiere.
Ist es möglich, die Leiste oben ("Microsoft Excel - Dateiname.xlsm") ganz auszublenden, so dass Sie z.B, nur nach Betöätigung der ESC-Taste wieder sichtbar wird?
Oder zumindest nur den Dateinamen (ohne xlsm) anzeigen lassen?!
Bin für jeden Tipp dankbar.
Gruß
TOM

4
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
ActiveWindow.Caption ="Dein Text"
17.11.2013 10:02:59
Matthias
Hallo Tom
Vielleicht vorher einfach mit VBA
ActiveWindow.Caption ="Dein Text"
Gruß Matthias

AW: ActiveWindow.Caption ="Dein Text"
17.11.2013 11:06:36
Tom
Hi Matthias,
danke.
Ich würde aber auch gerne das "Excel-Zeichen" weg haben ...
Habe da was gefunden, was aber nicht richtig funktioniert und man muss es immer manuell als Makro starten:
Private Sub SetExcelIcon(ByVal IconPath As String)
Dim hWnd As Long
Dim hIcon As Long
hWnd = FindWindow("XLMAIN", Application.Caption)
hIcon = ExtractIcon(0, IconPath, 0)
If hIcon > 1 Then
Call SendMessage(hWnd, WM_SETICON, True, hIcon)
Call SendMessage(hWnd, WM_SETICON, False, hIcon)
End If
End Sub
Public Sub changeIconAndCaption()
Application.Caption = "XXXEXCELXXX"
'Die Icon-Datei muss im Verzeichnis der Arbeitsmappe liegen!
Call SetExcelIcon(ThisWorkbook.Path + "C:\Users\gevas\Pictures\Test.ico")
'Hier gewünschten Fenstertitel angeben!
Application.Caption = "Test 2014"
ActiveWindow.Caption = ""
End Sub
Public Sub resetIconAndCaption()
Application.Caption = "XXXEXCELXXX"
Call ResetExcelIcon
Application.Caption = ""
ActiveWindow.Caption = ActiveWorkbook.Name
End Sub
Gruß
TOM

Anzeige
AW: ActiveWindow.Caption ="Dein Text"
17.11.2013 11:07:09
Tom
Hi Matthias,
danke.
Ich würde aber auch gerne das "Excel-Zeichen" weg haben ...
Habe da was gefunden, was aber nicht richtig funktioniert und man muss es immer manuell als Makro starten:
Private Sub SetExcelIcon(ByVal IconPath As String)
Dim hWnd As Long
Dim hIcon As Long
hWnd = FindWindow("XLMAIN", Application.Caption)
hIcon = ExtractIcon(0, IconPath, 0)
If hIcon > 1 Then
Call SendMessage(hWnd, WM_SETICON, True, hIcon)
Call SendMessage(hWnd, WM_SETICON, False, hIcon)
End If
End Sub
Public Sub changeIconAndCaption()
Application.Caption = "XXXEXCELXXX"
'Die Icon-Datei muss im Verzeichnis der Arbeitsmappe liegen!
Call SetExcelIcon(ThisWorkbook.Path + "C:\Users\gevas\Pictures\Test.ico")
'Hier gewünschten Fenstertitel angeben!
Application.Caption = "Test 2014"
ActiveWindow.Caption = ""
End Sub
Public Sub resetIconAndCaption()
Application.Caption = "XXXEXCELXXX"
Call ResetExcelIcon
Application.Caption = ""
ActiveWindow.Caption = ActiveWorkbook.Name
End Sub
Gruß
TOM

Anzeige
AW: ActiveWindow.Caption ="Dein Text"
23.11.2013 11:20:18
JoWE
Hallo Tom,
wie wär's hiermit:
http://www.mrexcel.com/forum/excel-questions/6148-possible-hide-excel-title-bar.html
In der Diskussion findest Du den Code von Ivan F Moala, der m.E. genau das kann was Du möchtest:
Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As  _
String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long,  _
ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long,  _
ByVal nIndex As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const WS_CAPTION = &HC00000
Private Const WS_MAXIMIZEBOX = &H10000
Private Const WS_MINIMIZEBOX = &H20000
Private Const WS_SYSMENU = &H80000
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter  _
As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Enum ESetWindowPosStyles
SWP_SHOWWINDOW = &H40
SWP_HIDEWINDOW = &H80
SWP_FRAMECHANGED = &H20
SWP_NOACTIVATE = &H10
SWP_NOCOPYBITS = &H100
SWP_NOMOVE = &H2
SWP_NOOWNERZORDER = &H200
SWP_NOREDRAW = &H8
SWP_NOREPOSITION = SWP_NOOWNERZORDER
SWP_NOSIZE = &H1
SWP_NOZORDER = &H4
SWP_DRAWFRAME = SWP_FRAMECHANGED
HWND_NOTOPMOST = -2
End Enum
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As  _
Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Sub Title_Show()
ShowTitleBar True
End Sub
Sub Title_Hide()
ShowTitleBar False
End Sub
Sub ShowTitleBar(bShow As Boolean)
Dim lStyle As Long
Dim tRect As RECT
Dim sWndTitle As String
Dim xlhnd
'// Untested should perhaps look for the class ?!
sWndTitle = "Microsoft Excel - " & ActiveWindow.Caption
xlhnd = FindWindow(vbNullString, sWndTitle)
'// Get the window's position:
GetWindowRect xlhnd, tRect
'// Show the Title bar ?
If Not bShow Then
lStyle = GetWindowLong(xlhnd, GWL_STYLE)
lStyle = lStyle And Not WS_SYSMENU
lStyle = lStyle And Not WS_MAXIMIZEBOX
lStyle = lStyle And Not WS_MINIMIZEBOX
lStyle = lStyle And Not WS_CAPTION
Else
lStyle = GetWindowLong(xlhnd, GWL_STYLE)
lStyle = lStyle Or WS_SYSMENU
lStyle = lStyle Or WS_MAXIMIZEBOX
lStyle = lStyle Or WS_MINIMIZEBOX
lStyle = lStyle Or WS_CAPTION
End If
SetWindowLong xlhnd, GWL_STYLE, lStyle
Application.DisplayFullScreen = Not bShow
'// Ensure the style is set and makes the xlwindow the
'// same size, regardless of the title bar.
SetWindowPos xlhnd, 0, tRect.Left, tRect.Top, tRect.Right - tRect.Left, tRect.Bottom -  _
tRect.Top, SWP_NOREPOSITION Or SWP_NOZORDER Or SWP_FRAMECHANGED
End Sub
Gruß
Jochen
Anzeige

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige