473,394 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Instantiate Shell.Explorer.2 at runtime for a web page

I want to create a custom user control to be used in a web page (by
object tag) as an assembly. The user control needs to have a web
browser control in it. Having tried with the managed
System.Windows.Forms.WebBrowser or AxSHDocVw.AxWebBrowser, none of them

worked from IE invocation unfortunately. While
System.Windows.Forms.WebBrowser showed the page in Visual Studio 5000
Designer, AxSHDocVw.AxWebBrowser caught an exception at Navigate
function call.
Anyway, now I'm trying to use Shell.Explorer.2 in my custom user
control at runtime. The way I instantiate it is such:
Type loT = Type.GetTypeFromProgID("Shell.Explorer.2");
this.IE = Activator.CreateInstance(loT);
Then, this.IE can access all the properties of the ActiveX control,
like MenuBar, ToolBar etc.
However, it failed at, again, calling Navigate method. Debugger won't
step over the call.
If I replace Shell.Explorer.2 with InternetExplorer.Application, it
worked fine. Except that's not what I wanted because it launches IE in
a separate window.
Interestingly enough, if I embed Shell.Explorer.2 with its classid
directly into my web html page. It showed well, except the html object
id lost the reference to the control after exiting the onload function
in my javascript.
I must have missed something fundamantal in this attempt. Really hope
someone can direct me a little.
Thanks,
Jason

Jan 12 '06 #1
1 4475
Well, I think all these might be due to the argument TargetFrameName
passed to the method Navigate() of the Web Browser control. When a new
window (either a name string in javascript or boolean true for new
window in a C# assembly) is specified for the argument, the object
instance lives. Otherwise, it dies.

I now need to figure out the right value for it. I used the html frame
name for it in a direct embedding. The control won't display. I don't
know what to pass to it in my custom C# user control which contained
the browser control.

Jason

Jan 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mariano | last post by:
Hi, I have stored a menu in a database. The menu is dynamically updated and last level menu items contain the object type that should be instantiated. I am looking for a way to instantiate the...
1
by: willockguard-newsgoup | last post by:
I have some code in our database which opens Windows Explorer in a server folder related to a loaded form. The code is: Shell("explorer /e,/root, G:\Surveyor\Parsonages\" & strHouseNumber,...
1
by: Mark Olbert | last post by:
I have a TableAdapter declared in my website's App_Code directory (I'm using the declarative approach to design it). If, in a web page from the site, I try to instantiate an instance of the...
1
by: kyle.crommett | last post by:
My goal here is to get access to open a folder that is related to the current displayed record. For example, if the customer's last name is Smith, i want the folder "//server01/jobphotos/Smith" to...
6
by: siricharan82 | last post by:
Hi All, I have a problem that internet explorer home page was disabled by a virus site. Even though I tried in i.e from tools menu -->internet options -->home page -- address is...
6
by: sohail28 | last post by:
When i use to start Internet Explorer, it goes to default site" http://clip24h.com/" i don't know from where i get this site. but when i try to change it from internet properties. i seen its in...
4
by: JonniP | last post by:
Hi Am using Call Shell("explorer.exe c:\", vbNormalFocus) this works fine however i have the folder location stored in a txt field and would like the button to retrieve that location Private...
3
by: smartic | last post by:
My problem is when i login to my website it says can't found the page in inernet explore only when i refresh the page i login to the page, that is my code in the login page: <?php...
1
by: blurryanthem | last post by:
Hello, I am trying to create a program that would replicate different selected files "x" times into a specified directory and save them with filename indexes. Then after create a log list of the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.