473,804 Members | 3,802 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help: Exception using Threads and AxSHDocVw.AxWeb Browser

I have created an application that loads assemblies (plugins). These plugins
are windows forms that have an embedded browser.

private AxSHDocVw.AxWeb Browser browser;

If I comment out
this.browser = new AxSHDocVw.AxWeb Browser();
and associated code to avoid exceptions like
this.browser.Do ck = System.Windows. Forms.DockStyle .Fill;
this.browser.En abled = true;
from my plugin, then I don't get the exception.

I only receive the exception when using Threads. If I don't use threads then I don't
get the exceptions. The exception is generated --=> AFTER <=-- exiting main(). It
is NOT caught by the catch().

Any thoughts?
Dave

Da**********@Be llSouth.net
=============== =============== =============== =============== =
EXCEPTION:

An unhandled exception of type 'System.NullRef erenceException '
occurred in system.windows. forms.dll

Additional information: Object reference not set to an instance of an object.

=============== =============== =============== =============== =============== ===

CODE

main()
{
try {
plugin = (IPlugIn)assemb ly.CreateInstan ce("AJB.Plugin" );
plugin.PluginID = 74;

thr = new Thread( new ThreadStart(plu gin.Execute) );
thr.ApartmentSt ate = ApartmentState. STA;
thr.IsBackgroun d = true;
thr.Start();
thr.Join();
}
catch (Exception e)
{
string s = Application.Exe cutablePath.ToS tring() + "\n" + e.ToString() + e.Message + e.StackTrace;
MessageBox.Show (s, "ExecutePlugin( ) Error");
}
}
public void Execute()
{
InputForm ajbInputForm = new InputForm();
ajbInputForm.Sh owDialog();
ajbInputForm.Cl ose();
}
Jul 19 '05 #1
0 1985

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

Similar topics

0
1665
by: David Elliott | last post by:
I have created an application that loads assemblies (plugins). These plugins are windows forms that have an embedded browser. private AxSHDocVw.AxWebBrowser browser; If I comment out this.browser = new AxSHDocVw.AxWebBrowser(); and associated code to avoid exceptions like this.browser.Dock = System.Windows.Forms.DockStyle.Fill; this.browser.Enabled = true;
3
3381
by: Simon CJC | last post by:
Hello I use AxSHDocVw.AxWebBrowser in a windows application. But sometimes the url I browsed in AxSHDocVw.AxWebBrowser contains error caused by javascript. Can I prevent javascript from running in AxSHDocVw.AxWebBrowser Thanks Simon CJC
1
2430
by: Pengyu | last post by:
I host AxSHDocVw.AxWebBrowser in my C# application. It generally works ok. However, the AxSHDocVw.AxWebBrowser control sometime stucks and can not nevigate to other URLs. What is the problem? BTW, the network connection is ok. Thanks a lot, Pengyu
0
1053
by: Manuel Costa | last post by:
Hi i want to restrict the AxSHDocVw.AxWebBrowser to html pages. For example, when clicked, links to files by http or ftp should be canceled. manuel
2
4183
by: Chance Hopkins | last post by:
I'm trying to use the AxSHDocVw.AxWebBrowser control in a form and when I call .Navigate, instead of showing the html page, the download prompt shows up. If I click open, it uses my default browser instead of the control. If I open an excel doc or a word doc on my local HD, it shows up in the control after I click open. Does anyone know what I should check, to get the control opening HTML pages in itself instead of the default browser?
0
1385
by: Eþref DURNA | last post by:
I m navigateing a url and want to display that image at my web browser on my Windows application I m using AxSHDocVw.AxWebBrowser but when ever i redirect that url it does not shows that image it starts to download it I dont want to Download that Image i want to display it on my AxSHDocVw.AxWebBrowser or could someone tell me how do i control the windows file download dll ?
1
2005
by: jokolee | last post by:
i was using component AxSHDocVw.AxWebBrowser,,but i rather confuces because when i write AxWebBrowser1.Document. the next option is Gettype function,,,nothing else...... But when i write AxWebBrowser1.Document.all.tags("DIV").length() the code is running well....WHY..?? i realy confuces because AxWebBrowser1.Document.all it's not in the library but it's not error.....why..??? *-----------------------*
0
1257
by: nick_nw | last post by:
Hi, I've recently started moving my project's code into a parent project. Since doing so the AxSHDocVw.AxWebBrowser control and my form stops showing the file that I nvaigate to (via Navigate method) but instead starts up IE! My original app works fine. How can I stop it launching IE. As far as I can tell all the settings are the same.
1
1358
by: tim2006 | last post by:
When i try to run the program, it just hangs. If i remove the axwebbrowser control it works fine. Any ideas? Here is my code: class1.vb Imports System.Windows.Forms Imports System.Threading
0
9706
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...
0
9577
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10315
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
9140
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...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
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();...
1
4295
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
3
2990
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.