Sven's profileWebSmitSpacePhotosBlogListsMore Tools Help

Blog


    November 20

    Newline and RichTextBox in VB.NET

    Problem

    Today, I had several problems while using a RichTextBox for Application Logging with EntLib and the new Custom TextBoxListener capabilities. (Output is logging to a TextBox of my main form.) But the problem was that I just replaced TextBox with RichTextBox and the formatting didn't display properly.

    Solution

    Just replace the .Text Property with the .AppendText method of RichtTextBox, found here.

    Julian Day Format in VB.NET

    It's just that simple:

    Private Function GetJulianDay() As String

        Return Now.ToString("yy") & Now.DayOfYear.ToString("000")
    End Function
    September 29

    Siemens protocol 3964R in C#

    HOWTO:

    Did you ever look for a free implementation of the serial communications protocol 3964R? I found a solution. There is a free project called "rkjava" available on the web. Please have a look at www.rkjava.de. I tried converting this Java solution to C# and – surprise – it was successful. Communication now works very well and imagine – you saved several hundred Euros.

    The best feature: it's completely implemented in managed code – no P/Invoke and no ActiveX. By now I only know of the Adontec package based on ActiveX.

     

    Tags: PLC-access via serial interface, Siemens Moby-I, VB.NET, C#, 3964 R