axWebBrowser and C# (Dispose)

L

Logician

I get an issue with disposing of axWebBrowser. I googled this topic
and found a lot of people have the issue but no one really has a
resolution from what I saw.

The basic issue is that the pdf document is retained and after a
certain number, seems to be about 100, the systems refuses to open
more documents, and also it disallows updates on the pdf document.

I have tried a few versions of dispose but nothing really works.

Does anyone have any more information?


public class pdfDocument : System.Windows.Forms.Form
{
private System.Windows.Forms.Label lblError;
private System.Windows.Forms.Panel panel1;
public AxSHDocVw.AxWebBrowser axWebBrowser1;

pdfDocument newScanName1 = new pdfDocument();
string thisImageName=getPDFDir()+"\\"+thisScanName;
newScanName1.axWebBrowser1.Navigate(thisImageName);


newScanName1.Visible=true;
 
C

Cor Ligthert[MVP]

Logican,

Do you use framework 1.0 or 1.1 otherwise you can use the newer Net
webbrowser (although that is too not much more than a wrapper around
shdocvw)

Cor
 
L

Logician

Logican,

Do you use framework 1.0 or 1.1 otherwise you can use the newer Net
webbrowser (although that is too not much more than a wrapper around
shdocvw)

I am using VS 2005 Win Forms. What is the newbrowser and that still
suffer the same issues?
 
C

Cor Ligthert[MVP]

Hi,

What is this in your code?

newScanName1

Cor



Logican,

Do you use framework 1.0 or 1.1 otherwise you can use the newer Net
webbrowser (although that is too not much more than a wrapper around
shdocvw)

I am using VS 2005 Win Forms. What is the newbrowser and that still
suffer the same issues?
 
L

Logician

Hi,

What is this in your code?

newScanName1

The instance of pdfDocument, it is in another class (part of the UI).
The name should be newPdfDoc but the code was copy pasted from an
imagescan class.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top