Runtime Error 91
Posted: 30 Sep 2005, 14:26
Hi!
Hab mir heute die "ExplorerListView" angeguckt, coole Sache!!!
Zum testen hab ich Windows 2000 Pro, per VMWare, wie sich das Steuerelement auf älteren Versionen von Windows verhält.
Soweit auf den ersten Blick gut, jedoch scheitert der Start des Beispiels "Collapsible Groups" mit dem Runtime Fehler:
#91
Objektvariable oder With-Blockvariable nicht festgelegt.
Anschließend hab ich VB auf das Test Windows installiert:
[font=Courier New]With ExLvw.Groups
[highlight=yellow].Add "Group 1", 1[/highlight]
.Add "Group 2", 2
.Add "Group 3", 3
End With[/font]
Hier stoppt das ganze
Kommentier ich das ganze mit dem hinzufügen der Gruppen aus, stoppt er irgendwann wieder und meint die "uxtheme.dll" sei nicht vorhanden, nun-ja, die gibts ja auch erst ab Windows XP :buck:
[font=Courier New] [highlight=yellow]hTheme = OpenThemeData(Me.hWnd, StrPtr("ExplorerBar"))[/highlight]
If hTheme Then
' assume that all variations have the same size
GetThemePartSize hTheme, Me.hDC, 6, 1, rc, TS_TRUE, expandoSize
CloseThemeData hTheme
End If[/font]
Und auch hier ist der stop. Wenn auch dies auskommentiert wurde, geht alles, nur leider ohne die praktischen Gruppen
Kann man das ganze fixen, oder ist das nicht möglich für Windows 2000 (weil ich hab die Gruppen auch erst ab Windows XP gesehn)
[hr]
Translation for visitors not speaking German:
Hi!
Today I've taken a look at "ExplorerListView", great thing!!!
I've used VMWare with Windows 2000 Pro to test how the control behaves on older versions of Windows.
At the first sight it behaves well, but the sample "Collapsible Groups" stops on startup with the runtime error:
#91
Object variable or With block variable not set
Then I installed VB on this system:
[font=Courier New]With ExLvw.Groups
[highlight=yellow].Add "Group 1", 1[/highlight]
.Add "Group 2", 2
.Add "Group 3", 3
End With[/font]
Here the debugger stops
If I uncomment the insertion of the groups, it stops again and tells me that "uxtheme.dll" wasn't found. Well, this file was introduced with Windows XP :buck:
[font=Courier New] [highlight=yellow]hTheme = OpenThemeData(Me.hWnd, StrPtr("ExplorerBar"))[/highlight]
If hTheme Then
' assume that all variations have the same size
GetThemePartSize hTheme, Me.hDC, 6, 1, rc, TS_TRUE, expandoSize
CloseThemeData hTheme
End If[/font]
Here it stops again. Uncommenting it makes the program run, but the groups are missing.
Can you fix this or isn't this possible for Windows 2000? (I've seen groups on Windows XP only)
Hab mir heute die "ExplorerListView" angeguckt, coole Sache!!!
Zum testen hab ich Windows 2000 Pro, per VMWare, wie sich das Steuerelement auf älteren Versionen von Windows verhält.
Soweit auf den ersten Blick gut, jedoch scheitert der Start des Beispiels "Collapsible Groups" mit dem Runtime Fehler:
#91
Objektvariable oder With-Blockvariable nicht festgelegt.
Anschließend hab ich VB auf das Test Windows installiert:
[font=Courier New]With ExLvw.Groups
[highlight=yellow].Add "Group 1", 1[/highlight]
.Add "Group 2", 2
.Add "Group 3", 3
End With[/font]
Hier stoppt das ganze

Kommentier ich das ganze mit dem hinzufügen der Gruppen aus, stoppt er irgendwann wieder und meint die "uxtheme.dll" sei nicht vorhanden, nun-ja, die gibts ja auch erst ab Windows XP :buck:
[font=Courier New] [highlight=yellow]hTheme = OpenThemeData(Me.hWnd, StrPtr("ExplorerBar"))[/highlight]
If hTheme Then
' assume that all variations have the same size
GetThemePartSize hTheme, Me.hDC, 6, 1, rc, TS_TRUE, expandoSize
CloseThemeData hTheme
End If[/font]
Und auch hier ist der stop. Wenn auch dies auskommentiert wurde, geht alles, nur leider ohne die praktischen Gruppen

Kann man das ganze fixen, oder ist das nicht möglich für Windows 2000 (weil ich hab die Gruppen auch erst ab Windows XP gesehn)

[hr]
Translation for visitors not speaking German:
Hi!
Today I've taken a look at "ExplorerListView", great thing!!!
I've used VMWare with Windows 2000 Pro to test how the control behaves on older versions of Windows.
At the first sight it behaves well, but the sample "Collapsible Groups" stops on startup with the runtime error:
#91
Object variable or With block variable not set
Then I installed VB on this system:
[font=Courier New]With ExLvw.Groups
[highlight=yellow].Add "Group 1", 1[/highlight]
.Add "Group 2", 2
.Add "Group 3", 3
End With[/font]
Here the debugger stops

If I uncomment the insertion of the groups, it stops again and tells me that "uxtheme.dll" wasn't found. Well, this file was introduced with Windows XP :buck:
[font=Courier New] [highlight=yellow]hTheme = OpenThemeData(Me.hWnd, StrPtr("ExplorerBar"))[/highlight]
If hTheme Then
' assume that all variations have the same size
GetThemePartSize hTheme, Me.hDC, 6, 1, rc, TS_TRUE, expandoSize
CloseThemeData hTheme
End If[/font]
Here it stops again. Uncommenting it makes the program run, but the groups are missing.

Can you fix this or isn't this possible for Windows 2000? (I've seen groups on Windows XP only)