Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Shell32 XP vs Win7 [revisited]

Shell32 XP vs Win7 [revisited]

Shell32 XP vs Win7 [revisited]

See: thread222-1594332: Shell32 XP vs Win7

One of the things added in Windows NT 6.0, a.k.a. Longhorn, a.k.a. Windows Vista and Windows Server 2008 was a "3D window switcher" in Shell32, a.k.a. Explorer.

As part of this Microsoft altered the interface of Shell32.Shell to IShellDispatch5, which has a new method WindowSwitcher(). This seems to be the source of the problem.

One workaround is to create and use late-bound instances via CreateObject() calls.

However it can be cleaner and more efficient to create early-bound instances as before. It just gets a little tricky because we only have a limited and somewhat clunky way to do type casting in VB6: you need an extra object reference variable and can't use the "anonymous object" syntax: With New ...

So here's the trick required:


Dim Shell As Shell32.IShellDispatch4 'Don't use As Object or you have late-binding!

    Set Shell = CreateObject("Shell.Application")
    With Shell
        MsgBox .NameSpace(ssfCOMMONAPPDATA).Self.Path
    End With 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close