473,324 Members | 1,678 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,324 software developers and data experts.

webbrowser System.IO.FileNotFoundException

Hi All,

I am using webbrowser control, it is very often to happen:

A first chance exception of type 'System.IO.FileNotFoundException'
occurred in System.Windows.Forms.dll

but sometimes works, all the same code, what's the problem...and how to
resolve it...

Thank you very much.

Best regards,
Boki.

Apr 19 '06 #1
5 3038
Boki,

Is this when you are debugging, running, or whatever.

Can you show us the code where this happens?

Cor

"Boki" <bo******@ms21.hinet.net> schreef in bericht
news:11*********************@z34g2000cwc.googlegro ups.com...
Hi All,

I am using webbrowser control, it is very often to happen:

A first chance exception of type 'System.IO.FileNotFoundException'
occurred in System.Windows.Forms.dll

but sometimes works, all the same code, what's the problem...and how to
resolve it...

Thank you very much.

Best regards,
Boki.

Apr 19 '06 #2

Cor Ligthert [MVP] 寫道:
Boki,

Is this when you are debugging, running, or whatever.

Can you show us the code where this happens?

Cor

"Boki" <bo******@ms21.hinet.net> schreef in bericht
news:11*********************@z34g2000cwc.googlegro ups.com...
Hi All,

I am using webbrowser control, it is very often to happen:

A first chance exception of type 'System.IO.FileNotFoundException'
occurred in System.Windows.Forms.dll

but sometimes works, all the same code, what's the problem...and how to
resolve it...

Thank you very much.

Best regards,
Boki.


sure, please reference below
=============
Public Class Form1
Private mouseOffset As Point
Private isMouseDown As Boolean = False

Private Sub Form1_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.GotFocus
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Fixed3D
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
UpdateInfo()

End Sub

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs)
Handles WebBrowser1.DocumentCompleted

WebBrowser2.Navigate("http://mis.tse.com.tw/Quotes/Best5?Refresh=0&StkNo=2392")

Dim pos As Integer
pos = InStr(WebBrowser1.DocumentText, "C)", CompareMethod.Text)
Label1.Text = "T:" & Mid(WebBrowser1.DocumentText, pos + 65, 4)

pos = InStr(WebBrowser1.DocumentText, "(%)",
CompareMethod.Text)
Label2.Text = "H:" & Mid(WebBrowser1.DocumentText, pos + 66, 3)

Label4.Text = Mid$(TimeOfDay(), 4, 9)

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs)
UpdateInfo()

' Label1.Text = "Auto updating..."
End Sub
Private Sub WebBrowser2_DocumentCompleted(ByVal sender As Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs)
Handles WebBrowser2.DocumentCompleted
'-----stock information
Dim pos As Integer
pos = InStr(WebBrowser2.DocumentText, "MatchPrice",
CompareMethod.Text)
Label5.Text = "S: " & Mid(WebBrowser2.DocumentText, pos + 12,
5)

End Sub

Private Sub UpdateInfo()
WebBrowser1.Navigate("http://www.cwb.gov.tw/V5/observe/real/real_data_46692..htm")
End Sub

Private Sub Form1_LostFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.LostFocus
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
End Sub
Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As
MouseEventArgs) Handles MyBase.MouseUp
If e.Button = Windows.Forms.MouseButtons.Right Then
UpdateInfo()
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Window.open("www.kimo.com.tw")
End Sub
End Class

Apr 19 '06 #3
Boki,

Why do you not set the 2 or more webbrowsers in a Tabpage or a
splitcontainer. No problem as all.

I hope this helps,

Cor
"Boki" <bo******@ms21.hinet.net> schreef in bericht
news:11**********************@t31g2000cwb.googlegr oups.com...

Cor Ligthert [MVP] ??:
Boki,

Is this when you are debugging, running, or whatever.

Can you show us the code where this happens?

Cor

"Boki" <bo******@ms21.hinet.net> schreef in bericht
news:11*********************@z34g2000cwc.googlegro ups.com...
Hi All,

I am using webbrowser control, it is very often to happen:

A first chance exception of type 'System.IO.FileNotFoundException'
occurred in System.Windows.Forms.dll

but sometimes works, all the same code, what's the problem...and how to
resolve it...

Thank you very much.

Best regards,
Boki.


sure, please reference below
=============
Public Class Form1
Private mouseOffset As Point
Private isMouseDown As Boolean = False

Private Sub Form1_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.GotFocus
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Fixed3D
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
UpdateInfo()

End Sub

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs)
Handles WebBrowser1.DocumentCompleted

WebBrowser2.Navigate("http://mis.tse.com.tw/Quotes/Best5?Refresh=0&StkNo=2392")

Dim pos As Integer
pos = InStr(WebBrowser1.DocumentText, "C)", CompareMethod.Text)
Label1.Text = "T:" & Mid(WebBrowser1.DocumentText, pos + 65, 4)

pos = InStr(WebBrowser1.DocumentText, "(%)",
CompareMethod.Text)
Label2.Text = "H:" & Mid(WebBrowser1.DocumentText, pos + 66, 3)

Label4.Text = Mid$(TimeOfDay(), 4, 9)

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs)
UpdateInfo()

' Label1.Text = "Auto updating..."
End Sub
Private Sub WebBrowser2_DocumentCompleted(ByVal sender As Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs)
Handles WebBrowser2.DocumentCompleted
'-----stock information
Dim pos As Integer
pos = InStr(WebBrowser2.DocumentText, "MatchPrice",
CompareMethod.Text)
Label5.Text = "S: " & Mid(WebBrowser2.DocumentText, pos + 12,
5)

End Sub

Private Sub UpdateInfo()
WebBrowser1.Navigate("http://www.cwb.gov.tw/V5/observe/real/real_data_46692.htm")
End Sub

Private Sub Form1_LostFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.LostFocus
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
End Sub
Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As
MouseEventArgs) Handles MyBase.MouseUp
If e.Button = Windows.Forms.MouseButtons.Right Then
UpdateInfo()
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Window.open("www.kimo.com.tw")
End Sub
End Class
Apr 19 '06 #4

Cor Ligthert [MVP] 寫道:
Boki,

Why do you not set the 2 or more webbrowsers in a Tabpage or a
splitcontainer. No problem as all.

I hope this helps,

Cor
"Boki" <bo******@ms21.hinet.net> schreef in bericht
news:11**********************@t31g2000cwb.googlegr oups.com...

Cor Ligthert [MVP] ??:
Boki,

Is this when you are debugging, running, or whatever.

Can you show us the code where this happens?

Cor

"Boki" <bo******@ms21.hinet.net> schreef in bericht
news:11*********************@z34g2000cwc.googlegro ups.com...
Hi All,

I am using webbrowser control, it is very often to happen:

A first chance exception of type 'System.IO.FileNotFoundException'
occurred in System.Windows.Forms.dll

but sometimes works, all the same code, what's the problem...and how to
resolve it...

Thank you very much.

Best regards,
Boki.


sure, please reference below
=============
Public Class Form1
Private mouseOffset As Point
Private isMouseDown As Boolean = False

Private Sub Form1_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.GotFocus
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Fixed3D
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
UpdateInfo()

End Sub

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs)
Handles WebBrowser1.DocumentCompleted

WebBrowser2.Navigate("http://mis.tse.com.tw/Quotes/Best5?Refresh=0&StkNo=2392")

Dim pos As Integer
pos = InStr(WebBrowser1.DocumentText, "C)", CompareMethod.Text)
Label1.Text = "T:" & Mid(WebBrowser1.DocumentText, pos + 65, 4)

pos = InStr(WebBrowser1.DocumentText, "(%)",
CompareMethod.Text)
Label2.Text = "H:" & Mid(WebBrowser1.DocumentText, pos + 66, 3)

Label4.Text = Mid$(TimeOfDay(), 4, 9)

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs)
UpdateInfo()

' Label1.Text = "Auto updating..."
End Sub
Private Sub WebBrowser2_DocumentCompleted(ByVal sender As Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs)
Handles WebBrowser2.DocumentCompleted
'-----stock information
Dim pos As Integer
pos = InStr(WebBrowser2.DocumentText, "MatchPrice",
CompareMethod.Text)
Label5.Text = "S: " & Mid(WebBrowser2.DocumentText, pos + 12,
5)

End Sub

Private Sub UpdateInfo()
WebBrowser1.Navigate("http://www.cwb.gov.tw/V5/observe/real/real_data_46692.htm")
End Sub

Private Sub Form1_LostFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.LostFocus
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
End Sub
Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As
MouseEventArgs) Handles MyBase.MouseUp
If e.Button = Windows.Forms.MouseButtons.Right Then
UpdateInfo()
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Window.open("www.kimo.com.tw")
End Sub
End Class

because I don't know how to do that..><.....
could you please advice?

Apr 19 '06 #5
Boki,

Just drag a tabcontrol on your form
Drag in the tabpages the same as you did it now on the form, not so much to
learn.

Problem is that it is more dragging than code. Therefore I cannot even give
you a sample.

Cor

"Boki" <bo******@ms21.hinet.net> schreef in bericht
news:11********************@t31g2000cwb.googlegrou ps.com...

Cor Ligthert [MVP] ??:
Boki,

Why do you not set the 2 or more webbrowsers in a Tabpage or a
splitcontainer. No problem as all.

I hope this helps,

Cor
"Boki" <bo******@ms21.hinet.net> schreef in bericht
news:11**********************@t31g2000cwb.googlegr oups.com...

Cor Ligthert [MVP] ??:
Boki,

Is this when you are debugging, running, or whatever.

Can you show us the code where this happens?

Cor

"Boki" <bo******@ms21.hinet.net> schreef in bericht
news:11*********************@z34g2000cwc.googlegro ups.com...
Hi All,

I am using webbrowser control, it is very often to happen:

A first chance exception of type 'System.IO.FileNotFoundException'
occurred in System.Windows.Forms.dll

but sometimes works, all the same code, what's the problem...and how
to
resolve it...

Thank you very much.

Best regards,
Boki.


sure, please reference below
=============
Public Class Form1
Private mouseOffset As Point
Private isMouseDown As Boolean = False

Private Sub Form1_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.GotFocus
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Fixed3D
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
UpdateInfo()

End Sub

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs)
Handles WebBrowser1.DocumentCompleted

WebBrowser2.Navigate("http://mis.tse.com.tw/Quotes/Best5?Refresh=0&StkNo=2392")

Dim pos As Integer
pos = InStr(WebBrowser1.DocumentText, "C)", CompareMethod.Text)
Label1.Text = "T:" & Mid(WebBrowser1.DocumentText, pos + 65, 4)

pos = InStr(WebBrowser1.DocumentText, "(%)",
CompareMethod.Text)
Label2.Text = "H:" & Mid(WebBrowser1.DocumentText, pos + 66, 3)

Label4.Text = Mid$(TimeOfDay(), 4, 9)

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs)
UpdateInfo()

' Label1.Text = "Auto updating..."
End Sub
Private Sub WebBrowser2_DocumentCompleted(ByVal sender As Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs)
Handles WebBrowser2.DocumentCompleted
'-----stock information
Dim pos As Integer
pos = InStr(WebBrowser2.DocumentText, "MatchPrice",
CompareMethod.Text)
Label5.Text = "S: " & Mid(WebBrowser2.DocumentText, pos + 12,
5)

End Sub

Private Sub UpdateInfo()
WebBrowser1.Navigate("http://www.cwb.gov.tw/V5/observe/real/real_data_46692.htm")
End Sub

Private Sub Form1_LostFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.LostFocus
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
End Sub
Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As
MouseEventArgs) Handles MyBase.MouseUp
If e.Button = Windows.Forms.MouseButtons.Right Then
UpdateInfo()
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Window.open("www.kimo.com.tw")
End Sub
End Class

because I don't know how to do that..><.....
could you please advice?
Apr 19 '06 #6

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

Similar topics

1
by: ulf | last post by:
Hello, After I got a FileNotFoundException in my real life CSharp code, I nailed it down to the following line: System.EnterpriseServices.ResourcePool rp = new...
4
by: Randy | last post by:
Hi, ok, I found a way to connect to a running instance of an (external) Internet Explorer and access - for example - the html source. That works fine! But now I have running application with...
1
by: L. Chernov | last post by:
Hello, I am trying to work with .Net 2005 WebBrowser object, and put it on a "Windows control library" (embedded in a user control class) and then I am executing it from an ASP.Net webform(with...
11
by: Anil Gupte | last post by:
....and how do I insert one into my form? I used in VB 6.0 last, but cannot figure out where it is in .Net Thanx, -- Anil Gupte www.keeninc.net www.icinema.com
4
by: Steve Richter | last post by:
I would like to build an HTML stream as a string and have the WebBrowser control render that HTML. Then on PostBack, or whatever it is called, I would like my code to be the one that receives what...
7
by: - Electronic.HR - | last post by:
I have very strange and stupid problem with .NEt's webBrowser control... If I do this: ---------------------------------- private void btnGoogle_click(object sender, EventArgs e) { ...
2
by: =?Utf-8?B?c2FtMDFt?= | last post by:
I have a remoting application that was developed on a Windows XP SP2 machine with VS2005 SP1. I finally got everything deployed using Wix 3.0, and it works great. Problem is, when I install the msi...
11
by: kimiraikkonen | last post by:
Hi there, I needed to use MouseOver event on Webbrowser which is NOT provided by webbrowser control natively(what a disappointment), so i decided to go with another route to simulate this like: ...
3
by: TedTrippin | last post by:
Hi, Background - I've create a windows application in VS and added a WebBrowser component and all works well. I'm now trying to do this programmatically. My application now listens on a socket...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.