|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
webbrowser System.IO.FileNotFoundExceptionHi 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. Boki,
Is this when you are debugging, running, or whatever. Can you show us the code where this happens? Cor Show quoteHide quote "Boki" <bokit***@ms21.hinet.net> schreef in bericht news:1145413714.001892.68770@z34g2000cwc.googlegroups.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. > Cor Ligthert [MVP] 寫é“:
Show quoteHide quote > Boki, sure, please reference below> > Is this when you are debugging, running, or whatever. > > Can you show us the code where this happens? > > Cor > > "Boki" <bokit***@ms21.hinet.net> schreef in bericht > news:1145413714.001892.68770@z34g2000cwc.googlegroups.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. > > ============= 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.WebBrowserDocumentCompletedEventArgs) 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.WebBrowserDocumentCompletedEventArgs) 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 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" <bokit***@ms21.hinet.net> schreef in bericht Cor Ligthert [MVP] ??:news:1145425118.314664.281620@t31g2000cwb.googlegroups.com... Show quoteHide quote > Boki, sure, please reference below> > Is this when you are debugging, running, or whatever. > > Can you show us the code where this happens? > > Cor > > "Boki" <bokit***@ms21.hinet.net> schreef in bericht > news:1145413714.001892.68770@z34g2000cwc.googlegroups.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. > > ============= 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.WebBrowserDocumentCompletedEventArgs) 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.WebBrowserDocumentCompletedEventArgs) 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 Cor Ligthert [MVP] 寫é“:
Show quoteHide quote > Boki, because I don't know how to do that..><.....> > 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" <bokit***@ms21.hinet.net> schreef in bericht > news:1145425118.314664.281620@t31g2000cwb.googlegroups.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" <bokit***@ms21.hinet.net> schreef in bericht > > news:1145413714.001892.68770@z34g2000cwc.googlegroups.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.WebBrowserDocumentCompletedEventArgs) > 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.WebBrowserDocumentCompletedEventArgs) > 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 could you please advice? 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" <bokit***@ms21.hinet.net> schreef in bericht Cor Ligthert [MVP] ??:news:1145433903.726811.4130@t31g2000cwb.googlegroups.com... Show quoteHide quote > Boki, because I don't know how to do that..><.....> > 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" <bokit***@ms21.hinet.net> schreef in bericht > news:1145425118.314664.281620@t31g2000cwb.googlegroups.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" <bokit***@ms21.hinet.net> schreef in bericht > > news:1145413714.001892.68770@z34g2000cwc.googlegroups.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.WebBrowserDocumentCompletedEventArgs) > 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.WebBrowserDocumentCompletedEventArgs) > 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 could you please advice?
Listview SubItems image index
Emailing with default client Writing INI section failing 1.1 and 2.0 .Net framework in same application? Is it possible to compile an image file into a DLL or EXE file? Dynamically reading structure fields Two way collection Limits of the datagrid VS2002 windows service crashing under Windows 2003 SP1 Print rows from DataGrid matching criteria |
|||||||||||||||||||||||