473,659 Members | 2,987 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.WebBrowse r or AxSHDocVw.AxWeb Browser, none of them

worked from IE invocation unfortunately. While
System.Windows. Forms.WebBrowse r showed the page in Visual Studio 5000
Designer, AxSHDocVw.AxWeb Browser 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.GetTypeFro mProgID("Shell. Explorer.2");
this.IE = Activator.Creat eInstance(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 InternetExplore r.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 4490
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
1573
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 object dynamically without an enormous select case statement. I can't find nothing in the docs... Any ideas? To make things clear, what I want to do is something like this: dim objType as new String("CustomerObject") dim obj as new objType
1
2153
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, vbMaximizedFocus) With Win2K and XP having the ability to view thumbnails in Explorer, I've been trying to find some switches which would enable me to open the appropriate folder in thumbnail view. I've had no success and wondered whether this is at...
1
1465
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 TableAdapter dynamically: protected void Page_Load(object sender, EventArgs e) { // check that we can find the Type of the TableAdapter Type junk = typeof(page_infoTableAdapters.bd_contentTableAdapter); // now try to create the Type
1
2196
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 pop up when you click the Job photos button. So far this is all I have for it... RetVal = Shell("explorer /e,/root, //server01/jobphotos/Smith") This works on a one time basis, but i need it to be variable so it
6
13221
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 set by a virus. so when am using explorer that web page is automatically opening.
6
4521
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 hidden mode. how can i change it from "http://clip24h.com/" to some other page by default. MY Browser is Internet Explorer Version 6.0 SP 2. if it is VIRUS, let me know any kind of solution. Waiting for ur reply...............
4
15943
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 Sub cmdShortcut_Click() Dim strShortcut As String strShortcut = Me.txtShortcut
3
1498
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 include_once("Connections/Login_functions.php"); include(Data()); ?> <?php //--------------------------------------------- if($_POST){ if(!($userLOGIN=="" || $passLOGIN=="")){ $result=mysql_query("SELECT username,Password FROM users WHERE username='$userLOGIN'...
1
1330
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 successfully copied files via LogListBtn click ( maybe saving the text file in the C: root) ex. a. Help.txt ( copy 3x ), Report.xls ( copy 2x ) When they are saved in a specified directory they should look like: Help(1).txt
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8528
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2752
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.