<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>General</title>
        <link>http://onteorasoftware.com/category/17.aspx</link>
        <description>General</description>
        <language>en-US</language>
        <copyright>Ken Tucker</copyright>
        <generator>Subtext Version 2.1.2.2</generator>
        <item>
            <title>Welcome to BlogEngine.NET 1.3</title>
            <link>http://blog.onteorasoftware.net/archive/2007/12/22/welcome-to-blogengine.net-1.3.aspx</link>
            <description>&lt;p&gt;
If you see this post it means that BlogEngine.NET 1.3 is running and the hard part of creating your own blog is done. There is only one thing you need to do from this point on to take full advantage of the blog and that is to set up the first author profile. 
&lt;/p&gt;
&lt;h2&gt;Write Permissions&lt;/h2&gt;
&lt;p&gt;
To be able to log in to the blog and writing posts, you need to enable write permissions on the App_Data folder. If you’re blog is hosted at a hosting provider, you can either log into your account’s admin page or call the support. You need write permissions on the App_Data folder because all posts and comments are saved as XML files and placed in the App_Data folder. 
&lt;/p&gt;
&lt;h2&gt;Username and password&lt;/h2&gt;
&lt;p&gt;
When you've got write permissions to the App_Data folder, you need to change the username and password. Find the sign-in link located either at the bottom or top of the page depending on your current theme and click it. Now enter "admin" in both the username and password fields and click the button. You will now see an admin menu appear. It has a link to the "Users" admin page. From there you can change the username and password. 
&lt;/p&gt;
&lt;h2&gt;On the web &lt;/h2&gt;
&lt;p&gt;
You can find BlogEngine.NET on the &lt;a href="http://www.dotnetblogengine.net"&gt;official website&lt;/a&gt;. Here you'll find tutorials, documentation, tips and tricks and much more. The ongoing development of BlogEngine.NET can be followed at &lt;a href="http://www.codeplex.com/blogengine"&gt;CodePlex&lt;/a&gt; where the daily builds will be published for anyone to download. 
&lt;/p&gt;
&lt;p&gt;
Good luck and happy writing. 
&lt;/p&gt;
&lt;p&gt;
The BlogEngine.NET team 
&lt;/p&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/37.aspx" width="1" height="1" /&gt;</description>
            <guid>http://blog.onteorasoftware.net/archive/2007/12/22/welcome-to-blogengine.net-1.3.aspx</guid>
            <pubDate>Sat, 22 Dec 2007 12:45:14 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/37.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/12/22/welcome-to-blogengine.net-1.3.aspx#feedback</comments>
            <slash:comments>27</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/37.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Dry Dock</title>
            <link>http://blog.onteorasoftware.net/archive/2007/10/11/dry-dock.aspx</link>
            <description>The past few weeks the ship I work on has been in dry dock.  I hope to be home in about a week and start adding some new blog entries soon.&lt;br /&gt;
&lt;br /&gt;
&lt;img alt="" width="480" height="360" src="/image.axd?picture=FrontShip.jpg" /&gt; &lt;img alt="" width="480" height="360" src="/image.axd?picture=RearShip.jpg" /&gt;&lt;img src="http://blog.onteorasoftware.net/aggbug/50.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Blog Author</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/10/11/dry-dock.aspx</guid>
            <pubDate>Thu, 11 Oct 2007 04:00:00 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/50.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/10/11/dry-dock.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/50.aspx</wfw:commentRss>
        </item>
        <item>
            <title>GotDotNet Phase out</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/gotdotnet-phase-out.aspx</link>
            <description>&lt;h3 align="center"&gt;GotDotNet Phase out&lt;/h3&gt;&lt;br /&gt;
Since the GotDotNet website is being phased out I am placing my user samples here .&lt;br /&gt;
&lt;br /&gt;
&lt;a href="/downloads/videocapture.zip"&gt;Video Capture Box&lt;/a&gt; &lt;br /&gt;
&lt;p&gt;
A inherted picturebox control which allows you to capture an image from a webcam. Also adds a ByteImage Property to make it easier to bind to an image from a database. 
&lt;/p&gt;
&lt;br /&gt;
&lt;a href="/downloads/messages.zip"&gt;Enum Windows&lt;/a&gt; &lt;br /&gt;
&lt;p&gt;
A module you can add to your projects which contains an enum with all the WM_ messages. Good to use when overriding wndproc.
&lt;/p&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/59.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/gotdotnet-phase-out.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 19:38:14 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/59.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/gotdotnet-phase-out.aspx#feedback</comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/59.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Printer Compatibility Library 1.0</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/printer-compatibility-library-1.0.aspx</link>
            <description>&lt;h3 align="center"&gt;Printer Compatibility Library 1.0&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
Visual Basic 6.0 and earlier had a printer object which made it simple to print. The &lt;a href="http://msdn2.microsoft.com/en-us/vbasic/bb219077.aspx"&gt;Printer Compatibility Library 1.0&lt;/a&gt; makes it possible to use the same object with VB or C# 2005. After installing the Power Pack just add a reference to Microsoft.VisualBasic.PowerPacks.Printing.Printer 
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;p&gt;
VB Sample 
&lt;/p&gt;
&lt;p&gt;
Imports Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
&lt;/p&gt;
&lt;p&gt;
Public Class Form1
&lt;/p&gt;
&lt;p&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        Dim p As New Printer&lt;br /&gt;
        p.Print("Page 1")&lt;br /&gt;
        p.NewPage()&lt;br /&gt;
        p.Print("Page 2")&lt;br /&gt;
        p.EndDoc()&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;p&gt;
C# Sample 
&lt;/p&gt;
&lt;p&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ComponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6;
&lt;/p&gt;
&lt;p&gt;
namespace PrinterCS&lt;br /&gt;
{&lt;br /&gt;
    public partial class Form1 : Form&lt;br /&gt;
    {&lt;br /&gt;
        public Form1()&lt;br /&gt;
        {&lt;br /&gt;
            InitializeComponent();&lt;br /&gt;
        }
&lt;/p&gt;
&lt;p&gt;
        private void Form1_Load(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Printer p = new Printer();&lt;br /&gt;
            p.Print("Page 1");&lt;br /&gt;
            p.NewPage();&lt;br /&gt;
            p.Print("Page 2");&lt;br /&gt;
            p.EndDoc();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 
&lt;/p&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/88.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/printer-compatibility-library-1.0.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 19:04:51 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/88.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/printer-compatibility-library-1.0.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/88.aspx</wfw:commentRss>
        </item>
        <item>
            <title>.Net Framework 3.0 Text to Speech</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/.net-framework-3.0-text-to-speech.aspx</link>
            <description>&lt;h3 align="center"&gt;.Net Framework 3.0 Text to Speech&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
The dot net framework 3.0 now has a managed provider for text to speech. I tested this app on a machine with windows xp service pack 2 and the &lt;a href="http://msdn.microsoft.com/windowsvista/downloads/products/getthebeta/#runWinFXApps"&gt;Dot Net FrameWork 3.0 RC1.&lt;/a&gt; The link is to set up instructions for the .net framework 3.0 
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;p&gt;
For this sample add a reference to system.speech, place a textbox named txtSay, a button named btnSay, and listbox named lstVoice. The application fills a list box with the installed voices on the system at startup. When you click on the button it says the text in the textbox with the selected voice. 
&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
VB Sample 
&lt;/p&gt;
&lt;p&gt;
Imports System.Speech.Synthesis
&lt;/p&gt;
&lt;p&gt;
Public Class Form1
&lt;/p&gt;
&lt;p&gt;
    Private Sub btnSay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSay.Click&lt;br /&gt;
        Dim spk As New SpeechSynthesizer&lt;br /&gt;
        spk.SelectVoice(lstVoice.SelectedItem.ToString)&lt;br /&gt;
        spk.Speak(txtSay.Text)&lt;br /&gt;
    End Sub
&lt;/p&gt;
&lt;p&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        Dim spk As New SpeechSynthesizer&lt;br /&gt;
        For Each voice As InstalledVoice In spk.GetInstalledVoices&lt;br /&gt;
            lstVoice.Items.Add(voice.VoiceInfo.Name)&lt;br /&gt;
        Next&lt;br /&gt;
        lstVoice.SelectedIndex = 0&lt;br /&gt;
        txtSay.Text = "Hello World!"&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;p&gt;
C# Sample 
&lt;/p&gt;
&lt;p&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ComponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Speech.Synthesis;
&lt;/p&gt;
&lt;p&gt;
namespace CS3._Speech&lt;br /&gt;
{&lt;br /&gt;
    public partial class Form1 : Form&lt;br /&gt;
    {&lt;br /&gt;
        public Form1()&lt;br /&gt;
        {&lt;br /&gt;
            InitializeComponent();&lt;br /&gt;
        }
&lt;/p&gt;
&lt;p&gt;
        private void Form1_Load(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            SpeechSynthesizer spk = new SpeechSynthesizer();&lt;br /&gt;
            foreach(InstalledVoice voice in spk.GetInstalledVoices())&lt;br /&gt;
            {&lt;br /&gt;
                lstVoice.Items.Add(voice.VoiceInfo.Name);&lt;br /&gt;
            }&lt;br /&gt;
            lstVoice.SelectedIndex = 0;&lt;br /&gt;
            txtSay.Text = "Hello World";&lt;br /&gt;
        }
&lt;/p&gt;
&lt;p&gt;
        private void btnSay_Click(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            SpeechSynthesizer spk = new SpeechSynthesizer();
&lt;/p&gt;
&lt;p&gt;
            spk.SelectVoice(lstVoice.SelectedItem.ToString());&lt;br /&gt;
            spk.Speak(txtSay.Text);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}
&lt;/p&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/95.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/.net-framework-3.0-text-to-speech.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 18:57:48 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/95.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/.net-framework-3.0-text-to-speech.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/95.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Beta Certification Exam</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/beta-certification-exam.aspx</link>
            <description>&lt;h3 align="center"&gt;Beta Certification Exam&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
I took the beta exam for Microsoft Windows Mobile 5.0 - Application Development (exam number 70-540) with the visual basic option. The exam had 81 questions with a 4 hour time limit. There was one c# question slipped in there. 
&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
There were questions on the creating menus, smart phone connection status to the network, interacting with contact list, listing items in the task list, serial port, xml, and httpwebrequests.
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
SQL Everywhere (formerly SQL Mobile) was a topic which had a few questions. You will need to know how to repair a database, and sync with a sql 2005 database. 
&lt;/p&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/97.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/beta-certification-exam.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 18:55:45 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/97.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/beta-certification-exam.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/97.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Secure Strings</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/secure-strings.aspx</link>
            <description>&lt;h3 align="center"&gt;Secure Strings&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
The SecureString is a new class that was added in the .Net framework 2.0 which allows you to store info in memory securely. The SecureString could be used to safely secure a password or credit number. The example shows how to add info to the string, prevent changes from being make to the data, and finally how to get the info back. I included c# and VB samples. 
&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
C# sample 
&lt;/p&gt;
&lt;p&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ComponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Security;&lt;br /&gt;
using System.Runtime.InteropServices;
&lt;/p&gt;
&lt;p&gt;
namespace SecureStringCS&lt;br /&gt;
{&lt;br /&gt;
    public partial class Form1 : Form&lt;br /&gt;
    {&lt;br /&gt;
        public Form1()&lt;br /&gt;
        {&lt;br /&gt;
            InitializeComponent();&lt;br /&gt;
        }
&lt;/p&gt;
&lt;p&gt;
        private void Form1_Load(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            //&lt;br /&gt;
            // How to add to a secure string&lt;br /&gt;
            //&lt;br /&gt;
            SecureString ss = new SecureString();&lt;br /&gt;
            foreach (Char c in "This is some info I need to keep secure".ToCharArray())&lt;br /&gt;
            {&lt;br /&gt;
                ss.AppendChar(c);&lt;br /&gt;
            }&lt;br /&gt;
            //&lt;br /&gt;
            // Prevent changes&lt;br /&gt;
            //&lt;br /&gt;
            ss.MakeReadOnly();
&lt;/p&gt;
&lt;p&gt;
            //&lt;br /&gt;
            // How to get the info back&lt;br /&gt;
            //
&lt;/p&gt;
&lt;p&gt;
            IntPtr ptr;&lt;br /&gt;
            ptr=Marshal.SecureStringToBSTR(ss);
&lt;/p&gt;
&lt;p&gt;
            String s;&lt;br /&gt;
            s = Marshal.PtrToStringAuto(ptr);&lt;br /&gt;
            Marshal.ZeroFreeBSTR(ptr);
&lt;/p&gt;
&lt;p&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;
VB sample 
&lt;/p&gt;
&lt;p&gt;
Imports System.Security&lt;br /&gt;
Imports System.Runtime.InteropServices
&lt;/p&gt;
&lt;p&gt;
Public Class Form1
&lt;/p&gt;
&lt;p&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
&lt;/p&gt;
&lt;p&gt;
        '&lt;br /&gt;
        ' how to add to a secure string&lt;br /&gt;
        '&lt;br /&gt;
        Dim ss As New SecureString&lt;br /&gt;
        For Each c As Char In "This is some info I need to keep secure".ToCharArray&lt;br /&gt;
            ss.AppendChar(c)&lt;br /&gt;
        Next
&lt;/p&gt;
&lt;p&gt;
        ' prevent changes
&lt;/p&gt;
&lt;p&gt;
        ss.MakeReadOnly()
&lt;/p&gt;
&lt;p&gt;
        '&lt;br /&gt;
        ' how to get the info back&lt;br /&gt;
        '&lt;br /&gt;
        Dim ptr As IntPtr&lt;br /&gt;
        ptr = Marshal.SecureStringToBSTR(ss)&lt;br /&gt;
        Dim s As String
&lt;/p&gt;
&lt;p&gt;
        s = Marshal.PtrToStringAuto(ptr)&lt;br /&gt;
        Marshal.ZeroFreeBSTR(ptr)
&lt;/p&gt;
&lt;p&gt;
    End Sub&lt;br /&gt;
End Class
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/99.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/secure-strings.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 18:54:41 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/99.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/secure-strings.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/99.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Encrypting Data</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/encrypting-data.aspx</link>
            <description>&lt;h3 align="center"&gt;Encrypting Data&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
Here is a vb2005 example on how to encrypt and decrypt data. I am storing the encryption key as a base64 string in the programs settings. The settings name is Key and its starting string value was Unknown. In a production application I would store it in a more secure location. 
&lt;/p&gt;
&lt;p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Imports System.Security.Cryptography&lt;br /&gt;
Imports System.IO&lt;br /&gt;
Imports System.Text
&lt;/p&gt;
&lt;p&gt;
Public Class Form1&lt;br /&gt;
    Public Key() As Byte&lt;br /&gt;
    Public IV() As Byte
&lt;/p&gt;
&lt;p&gt;
    Public Function Encrypt(ByVal strData As String) As Byte()&lt;br /&gt;
        Dim data() As Byte = ASCIIEncoding.ASCII.GetBytes(strData)&lt;br /&gt;
        Dim tdes As TripleDESCryptoServiceProvider = _&lt;br /&gt;
                New TripleDESCryptoServiceProvider&lt;br /&gt;
        If Key Is Nothing Then&lt;br /&gt;
            tdes.GenerateKey()&lt;br /&gt;
            tdes.GenerateIV()&lt;br /&gt;
            Key = tdes.Key&lt;br /&gt;
            IV = tdes.IV&lt;br /&gt;
        Else&lt;br /&gt;
            tdes.Key = Key&lt;br /&gt;
            tdes.IV = IV&lt;br /&gt;
        End If&lt;br /&gt;
        Dim encryptor As ICryptoTransform = tdes.CreateEncryptor()&lt;br /&gt;
        Dim ms As New MemoryStream&lt;br /&gt;
        Dim cs As CryptoStream = _&lt;br /&gt;
                New CryptoStream(ms, encryptor, CryptoStreamMode.Write)&lt;br /&gt;
        cs.Write(data, 0, data.Length)&lt;br /&gt;
        cs.FlushFinalBlock()&lt;br /&gt;
        ms.Position = 0&lt;br /&gt;
        Dim result(Convert.ToInt32(ms.Length - 1)) As Byte&lt;br /&gt;
        ms.Read(result, 0, Convert.ToInt32(ms.Length))&lt;br /&gt;
        cs.Close()&lt;br /&gt;
        Return result&lt;br /&gt;
    End Function
&lt;/p&gt;
&lt;p&gt;
    Private Sub btnEncrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEncrypt.Click&lt;br /&gt;
        Dim data() As Byte&lt;br /&gt;
        data = System.Text.Encoding.Default.GetBytes(TextBox1.Text)&lt;br /&gt;
        Dim result() As Byte
&lt;/p&gt;
&lt;p&gt;
        Dim sha As New SHA1Managed&lt;br /&gt;
        ' This is one implementation of the abstract class SHA1.&lt;br /&gt;
        result = sha.ComputeHash(data)&lt;br /&gt;
        lblEncrypted.Text = Convert.ToBase64String(Encrypt(TextBox1.Text))&lt;br /&gt;
        lblDecrypted.Text = Decrypt(Convert.FromBase64String(lblEncrypted.Text))&lt;br /&gt;
    End Sub
&lt;/p&gt;
&lt;p&gt;
    Public Function GetEncryptedData(ByVal Data As String) As String&lt;br /&gt;
        Dim shaM As New SHA1Managed&lt;br /&gt;
        Convert.ToBase64String(shaM.ComputeHash(System.Text.Encoding.ASCII.GetBytes(Data)))&lt;br /&gt;
        Dim eNC_data() As Byte = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)&lt;br /&gt;
        Dim eNC_str As String = Convert.ToBase64String(eNC_data)&lt;br /&gt;
        GetEncryptedData = eNC_str&lt;br /&gt;
    End Function
&lt;/p&gt;
&lt;p&gt;
    Public Function GetDecryptedData(ByVal Data As String) As String&lt;br /&gt;
        Dim dEC_data() As Byte = Convert.FromBase64String(Data)&lt;br /&gt;
        Dim dEC_Str As String = System.Text.ASCIIEncoding.ASCII.GetString(dEC_data)&lt;br /&gt;
        GetDecryptedData = dEC_Str&lt;br /&gt;
    End Function&lt;br /&gt;
    Public Function Decrypt(ByVal data() As Byte) As String&lt;br /&gt;
        Dim tdes As TripleDESCryptoServiceProvider = _&lt;br /&gt;
                New TripleDESCryptoServiceProvider&lt;br /&gt;
        tdes.Key = Key&lt;br /&gt;
        tdes.IV = IV&lt;br /&gt;
        Dim decryptor As ICryptoTransform = tdes.CreateDecryptor()&lt;br /&gt;
        Dim ms As New MemoryStream&lt;br /&gt;
        Dim cs As CryptoStream = New CryptoStream(ms, decryptor, CryptoStreamMode.Write)&lt;br /&gt;
        cs.Write(data, 0, data.Length)&lt;br /&gt;
        cs.FlushFinalBlock()&lt;br /&gt;
        ms.Position = 0&lt;br /&gt;
        Dim result(Convert.ToInt32(ms.Length - 1)) As Byte&lt;br /&gt;
        ms.Read(result, 0, Convert.ToInt32(ms.Length))&lt;br /&gt;
        cs.Close()&lt;br /&gt;
        Return ASCIIEncoding.ASCII.GetString(result)&lt;br /&gt;
    End Function
&lt;/p&gt;
&lt;p&gt;
    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing&lt;br /&gt;
        Try&lt;br /&gt;
            My.Settings.Key = Convert.ToBase64String(Key)&lt;br /&gt;
            My.Settings.IV = Convert.ToBase64String(IV)&lt;br /&gt;
        Catch&lt;br /&gt;
        End Try&lt;br /&gt;
    End Sub
&lt;/p&gt;
&lt;p&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        If My.Settings.Key &amp;lt;&amp;gt; "Unknown" Then&lt;br /&gt;
            Key = Convert.FromBase64String(My.Settings.Key)&lt;br /&gt;
            IV = Convert.FromBase64String(My.Settings.IV)&lt;br /&gt;
        End If
&lt;/p&gt;
&lt;p&gt;
    End Sub&lt;br /&gt;
End Class
&lt;/p&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/107.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/encrypting-data.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 18:39:49 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/107.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/encrypting-data.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/107.aspx</wfw:commentRss>
        </item>
        <item>
            <title>DXCore</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/dxcore.aspx</link>
            <description>&lt;h3 align="center"&gt;DXCore&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
Developers express has a free product DX Core. It is a framework to develop add ins for visual studio. With it you can paint on the ide, work with the text, etc. 
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
I answer alot of questions in the newsgroups and forums. From time to time I copy code from the ide and when it pasted it looses the format. To overcome this limitation I usually paste the text in notepad. I then recopy the text and paste it in the question I am answering to preseve the format. 
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
Today I used the dxcore to add the copy as text to context menu when you right click on selected code. Step one download and install the &lt;a href="http://www.devexpress.com/Downloads/NET/DXCore/"&gt;DXCore.&lt;/a&gt; Note the dx core does not work with the express editions of visual studio. 
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
Step 2 from the DevExpress menu added to visual studio select New Plug in. This will create a project for the addin. 
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
Step 3 Drag a Action on to the designer from the toolbox. Set it action name, button text, and desciption to Copy as Text. Set the CommonMenu to EditorContext. Double Click on the action and add this code to the Action_Execute Event. &lt;br /&gt;
&lt;br /&gt;
    Private Sub Action1_Execute(ByVal ea As DevExpress.CodeRush.Core.ExecuteEventArgs) Handles Action1.Execute&lt;br /&gt;
        Dim template As String = CodeRush.Selection.Text 
&lt;/p&gt;
&lt;p&gt;
        Clipboard.SetDataObject(template) 
&lt;/p&gt;
&lt;p&gt;
    End Sub 
&lt;/p&gt;
&lt;p&gt;
Run this from the ide. It will open up another instance of the ide. Open a project and select some code and right click on it. You will see the copy as text in the menu, Boy does dev express make it easy. 
&lt;/p&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/113.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/dxcore.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 18:34:08 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/113.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/dxcore.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/113.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Virtual Server 2005 R2 Now free</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/virtual-server-2005-r2-now-free.aspx</link>
            <description>&lt;h3 align="center"&gt;Virtual Server 2005 R2 Now free&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
Microsoft has now made Virtual server 2005 R2 a free product. You can download Virtual Server 2005 R2 &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=6DBA2278-B022-4F56-AF96-7B95975DB13B&amp;amp;displaylang=en&amp;amp;hash=QM85LS5"&gt;here.&lt;/a&gt; 
&lt;/p&gt;
&lt;br /&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/121.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/virtual-server-2005-r2-now-free.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 18:30:41 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/121.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/virtual-server-2005-r2-now-free.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/121.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>