Friday, October 11, 2013

WebBrowser DocumentCompleted event fired more than once

How To Determine When a Page Is Done Loading in WebBrowser Control DocumentCompleted is WinForms' wrapper of the DocumentComplete evert, however WebBrowserDocumentCompletedEventArgs hides the sender parameter so you cannot tell which frame is raising the event. Alternatively you can check WebBrowser.ReadyState.

By Sheng Jiang 蒋晟

Wednesday, October 9, 2013

Use NumberStyles parameter in Parse and TryParse

When you want to parse string to int which contains various style or format, such as currency symbol, thousands separator, etc., use TryParse(String, NumberStyles, IFormatProvider, Int32). See more:

Int32.TryParse Method (String, NumberStyles, IFormatProvider, Int32)

http://msdn.microsoft.com/en-us/library/zf50za27.aspx