|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Form1 can't getfocus again...After enter the textbox1 ( whatever type text in or not ), I can't make the Form1_GotFocus event again.... I use that event to change form apparel..... 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 TextBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.DoubleClick Shell("D:\Program Files\Mozilla Firefox\firefox.exe http://tw.dictionary.yahoo.com/search?ei=UTF-8&p=" & TextBox1.Text) End Sub End Class Try using the Form's Activate and Deactivate events, instead. See my
reply to your prev. post. Regards, Cerebrus. Cerebrus 寫é“:
> Try using the Form's Activate and Deactivate events, instead. See my much better..> reply to your prev. post. > > Regards, > > Cerebrus. Best regards, Boki.
How to extract multiple occurrences of a substring
Merging data received via TCP Textbox data entry validation Finding A Record in a Dataset by index Regex.Replace SQL Server reporting services... Waiting for ThreadPool textbox enter or GotFocus COM usage problem? Wait while processing dialog boxes (threading?) |
|||||||||||||||||||||||