Reuse, Reuse and More Code Reuse!

Recently an intern on the team I am currently working on asked me to review the code on a new solution he has been tasked to code. About a week or so later, I received the following from him via chat: On the project I sent you, I don't understand what you mean by use … Continue reading Reuse, Reuse and More Code Reuse!

Setting a Control Property Value from a Non-UI Thread

As most of you might know (I hope) it is unwise to call methods on a Control from a non-UI thread. This can cause all sorts of issues. Actually, I think in most cases .NET will throw and Exception. If you need to set a property on a Control this is how you would properly … Continue reading Setting a Control Property Value from a Non-UI Thread

Convert RTF to Text

If you need to convert RTF to text, here is a simple way of doing it:    Public Shared Function ConvertRtfToText(ByVal input As String) As String      Dim returnValue As String = String.Empty      Using converter As New System.Windows.Forms.RichTextBox()        converter.Rtf = input        returnValue = converter.Text      End Using      Return returnValue    End Function Tip Submitted By: David McCarter This code … Continue reading Convert RTF to Text