Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
700to704
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
700to704
700to704
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

titel Bar nochmal

titel Bar nochmal
26.11.2005 22:09:52
Rolf
Hallo Leute
gibt es im Forum solche
die soweit sind und mit
titel Bar(Title Bar) was
anfangen können?Also einige
Programme nutzen die Fläche
von titel Bar um aktuelle
Infos vor die Nase bringen.
Wäre sehr nützlich Diese nach
Excel zu bringen.Habe eine
Woche gegoogelt und habe nur
Kopfschmerzen bekommen.
Grüsse
Rolf

5
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: titel Bar nochmal
26.11.2005 23:27:53
Nepumuk
Hi,
lass mal folgendes Makro (prcStart) laufen und schreib, was in Spalte C, neben dem entsprechenden Titel deines Börsenprogrammes, steht.
' **********************************************************************
' Modul: Modul1 Typ: Allgemeines Modul
' **********************************************************************

Option Explicit

Private Declare Function EnumWindows Lib "user32.dll" ( _
    ByVal lpEnumFunc As Long, _
    ByVal lParam As Long) As Boolean
Private Declare Function GetWindowText Lib "user32.dll" Alias "GetWindowTextA" ( _
    ByVal hWnd As Long, _
    ByVal lpString As String, _
    ByVal cch As Long) As Long
Private Declare Function GetWindowTextLength Lib "user32.dll" Alias "GetWindowTextLengthA" ( _
    ByVal hWnd As Long) As Long
Private Declare Function GetClassName Lib "user32.dll" Alias "GetClassNameA" ( _
    ByVal hWnd As Long, _
    ByVal lpClassName As String, _
    ByVal nMaxCount As Long) As Long
Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" ( _
    ByVal hWnd As Long, _
    ByVal wIndx As Long) As Long

Private Const GWL_STYLE = -&H10
Private Const WS_VISIBLE = &H10000000
Private Const WS_BORDER = &H800000

Private lngRow As Long

Public Sub prcStart()
    lngRow = 0
    ThisWorkbook.Worksheets(1).UsedRange.ClearContents
    EnumWindows AddressOf fncWindows, ByVal 0&
    ThisWorkbook.Worksheets(1).Columns.AutoFit
End Sub

Private Function fncWindows(ByVal hWnd As Long, ByVal lParam As Long) As Boolean
    Dim strTemp As String, lngReturn As Long, strClassName As String * 100
    Dim lngStyle As Long
    lngStyle = GetWindowLong(hWnd, GWL_STYLE) And (WS_VISIBLE Or WS_BORDER)
    lngReturn = GetWindowTextLength(hWnd)
    strTemp = Space(lngReturn)
    GetWindowText hWnd, strTemp, lngReturn + 1
    If lngStyle = (WS_VISIBLE Or WS_BORDER) And lngReturn <> 0 Then
        lngRow = lngRow + 1
        GetClassName hWnd, strClassName, 100
        With ThisWorkbook.Worksheets(1)
            .Cells(lngRow, 1) = hWnd
            .Cells(lngRow, 2) = strTemp
            .Cells(lngRow, 3) = Trim(strClassName)
        End With
    End If
    fncWindows = True
End Function

Gruß
Nepumuk

Anzeige
AW: titel Bar nochmal
27.11.2005 10:28:39
Rolf
Hallo Nepumuk
freue mich auf Deine Hilfe
Deinen Code habe ich mit copy/paste
installiert (reibungslos).
Also sobald ich starte werden
alle geoffnete Programme aufgelistet
(in Spalte B).Welches von interesse
wird so gegeben Broker_[^DJI],gegenüber
in Spalte C steht BrokerMainWnd.
Sobald ich ein anderes Fenster offne
wird auch das neue ausgelesen(jedoch nur Titel)die werte werden nicht ausgelesen
Also es wird der Titel vom activem Fenster ausgelesen!
die Werte die weiter rechts liegen werden nicht angesprochen.
Ich muss sagen das im activem Fenster noch Inner Fenster sind in deren Titel Bar
die Werte liegen.O.waja
Grüsse
Rolf
Anzeige
AW: titel Bar nochmal
27.11.2005 10:45:52
Nepumuk
Hallo Rolf,
dann wird es ohne das Programm unmöglich. Ich plane allerdings nicht, mir Software zu installieren die ich nicht brauchen kann. Es tut mir leid, aber dann kann ich dir nicht weiterhelfen.
Gruß
Nepumuk
AW: titel Bar nochmal
27.11.2005 11:44:07
Rolf
Hallo Nepumuk
es macht nichts ,Du hast ja grade
gezeigt das sowas möglich ist also
werde ich weiter suchen.Ich DANKE
sehr für Deine Hilfe!!Ich Wünsche
Dir das beste zu Weinachten und
Neujahr!
Grüsse
Rolf

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige