msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to launch an instance of InternetExplorer that displays

 
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE
Author Message
TC



Joined: 04 Oct 2007
Posts: 12

PostPosted: Mon Sep 27, 2004 9:16 am    Post subject: How to launch an instance of InternetExplorer that displays Reply with quote

Hello,

I am trying to launch an instance of 'InternetExplorer' that also displays
the "Folders" option of the "Explorer Bar"?

I was also wondering if there is a way to actually select a specific file
that will display as the default selection within the folder shown?

The code below launches the 'InternetExplorer' app but there does not appear
to be any VB accessible interface to set the other options.

Any ideas?

Thanks & Regards,

Todd



Public Enum FolderViewMode
FVM_ICON = 1
FVM_SMALLICON = 2
FVM_LIST = 3
FVM_DETAILS = 4
FVM_THUMBNAIL = 5
FVM_TILE = 6
FVM_THUMBSTRIP = 7
End Enum


Private Sub ShowExplorer()

Dim ieExplorer As InternetExplorer

' Create the explorer window
Set ieExplorer = New InternetExplorer

' Navigate to the folder
ieExplorer.Navigate2 "C:\"

Do While ieExplorer.ReadyState < READYSTATE_INTERACTIVE
DoEvents
Loop

' Set the view mode
ieExplorer.Document.CurrentViewMode = FVM_THUMBNAIL
' Show the window
ieExplorer.Visible = True

End Sub

Archived from group: microsoft>public>inetexplorer>nt
Back to top
View user's profile Send private message
Larry Serflaten



Joined: 04 Oct 2007
Posts: 2644

PostPosted: Mon Sep 27, 2004 1:03 pm    Post subject: Re: How to launch an instance of InternetExplorer that displ Reply with quote

(Follow up in : microsoft.public.vb.winapi )

"TC" wrote

>
> I am trying to launch an instance of 'InternetExplorer' that also displays
> the "Folders" option of the "Explorer Bar"?
>
> I was also wondering if there is a way to actually select a specific file
> that will display as the default selection within the folder shown?
>

Its not an exact science, but you might try calling Explorer itself:

Dim sysdir As String
Dim cmd As String

' Call explorer
cmd = "explorer "

' Give it a file to show
sysdir = Environ("windir")
cmd = cmd & """" & sysdir & "\explorer.exe"""

' Tell it to select that file
cmd = cmd & ", /select"

Shell cmd, vbNormalFocus


HTH
LFS
Back to top
View user's profile Send private message
Igor Tandetnik



Joined: 04 Oct 2007
Posts: 26

PostPosted: Mon Sep 27, 2004 2:01 pm    Post subject: Re: How to launch an instance of InternetExplorer that displ Reply with quote

"TC" wrote in message@TK2MSFTNGP09.phx.gbl
> I am trying to launch an instance of 'InternetExplorer' that also
> displays the "Folders" option of the "Explorer Bar"?

IWebBrowser2::ShowBrowserBar. The GUID you need is
{EFA24E64-B078-11D0-89E4-00C04FC9E26E}

> I was also wondering if there is a way to actually select a specific
> file that will display as the default selection within the folder
> shown?

I'm confused. You were talking about InternetExplorer - you know, that
application you browser Internet with? Now you seem to want to browse
local file system. For that, create an instance of Shell.Explorer and
use its IShellBrowser interface. Call BrowseObject to navigate to the
folder you want, QueryActiveShellView to get IShellView,
IShellView::SelectItem to select a file.
--
With best wishes,
Igor Tandetnik

"On two occasions, I have been asked [by members of Parliament], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able to rightly apprehend the kind of
confusion of ideas that could provoke such a question." -- Charles
Babbage
Back to top
View user's profile Send private message
TC



Joined: 04 Oct 2007
Posts: 12

PostPosted: Tue Sep 28, 2004 4:08 am    Post subject: Re: How to launch an instance of InternetExplorer that displ Reply with quote

Hey Igor,

I am wondering if all of these interfaces and methods are available under
VB?

I do not see them listed in the Object Browser's displays.

Perhaps I am missing something here.

Regards,

Todd



"Igor Tandetnik" wrote in message @TK2MSFTNGP09.phx.gbl...
> "TC" wrote in message
> @TK2MSFTNGP09.phx.gbl
>> I am trying to launch an instance of 'InternetExplorer' that also
>> displays the "Folders" option of the "Explorer Bar"?
>
> IWebBrowser2::ShowBrowserBar. The GUID you need is
> {EFA24E64-B078-11D0-89E4-00C04FC9E26E}
>
>> I was also wondering if there is a way to actually select a specific
>> file that will display as the default selection within the folder
>> shown?
>
> I'm confused. You were talking about InternetExplorer - you know, that
> application you browser Internet with? Now you seem to want to browse
> local file system. For that, create an instance of Shell.Explorer and
> use its IShellBrowser interface. Call BrowseObject to navigate to the
> folder you want, QueryActiveShellView to get IShellView,
> IShellView::SelectItem to select a file.
> --
> With best wishes,
> Igor Tandetnik
>
> "On two occasions, I have been asked [by members of Parliament], 'Pray,
> Mr. Babbage, if you put into the machine wrong figures, will the right
> answers come out?' I am not able to rightly apprehend the kind of
> confusion of ideas that could provoke such a question." -- Charles
> Babbage
>
>
Back to top
View user's profile Send private message
Larry Serflaten



Joined: 04 Oct 2007
Posts: 2644

PostPosted: Tue Sep 28, 2004 7:49 am    Post subject: Re: How to launch an instance of InternetExplorer that displ Reply with quote

"TC" wrote
>
> I am wondering if all of these interfaces and methods are available under
> VB?

Not by default.

> I do not see them listed in the Object Browser's displays.
>
> Perhaps I am missing something here.

Yep, go here and get the type library....

http://www.mvps.org/emorcillo/vb6/tlb/olelib.shtml

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Lost OLE functionality only for InternetExplorer.Application While testing out win32 ole control of Internet Explorer, I somehow managed to break it. Now whenever I try to create an ole control for Explorer I always get the error "the specified module could not be found". Only has the

InternetExplorer OnComplete Hi All, Can someone tell me how to implement an OnComplete function for the object please? example code would be much appreciated! Thanks! Andrew.

Why SINGLE value displays as INT I'm really puzzled here. Please help. lngResult1 = Int(365.25 * (iY + 4716)) + Int(30.6001 * (iM + 1)) sngResult2 = sngD + iB - 1524.5 sngJD = sngResult2 + lngResult1 The above math should result in a decimal value, such as 2436116.31. However, instead it

Control that displays list and manage mouse-click? What control can I use to display a list of items that I can click on with the mouse? For example, this control should be able to display three IDs, and when the user clicks on ID '002', the event handler will capture that and i'll find the specific info

video control displays blank screen when it is in dual-monit video control displays blank screen when it is in dual-monitor setup I'm developing cable feed application which has following setup, OS: Windows XP Pro SP 2 installed TV Tuner card:Dazzle My TV Philips 7130 chipset 9.0c A
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group