<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Metallica's blog &#187; Programming</title>
	<atom:link href="http://www.pieter-arntz.info/wordpressblog/?feed=rss2&#038;cat=4" rel="self" type="application/rss+xml" />
	<link>http://www.pieter-arntz.info/wordpressblog</link>
	<description>About malware</description>
	<lastBuildDate>Tue, 31 Aug 2010 19:50:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Put focus on a control</title>
		<link>http://www.pieter-arntz.info/wordpressblog/?p=102</link>
		<comments>http://www.pieter-arntz.info/wordpressblog/?p=102#comments</comments>
		<pubDate>Fri, 27 Feb 2009 20:40:05 +0000</pubDate>
		<dc:creator>metallica</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pieter-arntz.info/wordpressblog/?p=102</guid>
		<description><![CDATA[If you want to put the focus on a control immediately after the form loads, you need to show the form first. Example: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Show() Button2.Focus() End Sub]]></description>
			<content:encoded><![CDATA[<p>If you want to put the focus on a control immediately after the form loads, you need to show the form first.</p>
<p>Example:</p>
<p><em>Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
  Me.Show()<br />
  Button2.Focus()<br />
End Sub<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pieter-arntz.info/wordpressblog/?feed=rss2&amp;p=102</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Increase  TextBox size</title>
		<link>http://www.pieter-arntz.info/wordpressblog/?p=98</link>
		<comments>http://www.pieter-arntz.info/wordpressblog/?p=98#comments</comments>
		<pubDate>Thu, 12 Feb 2009 15:49:39 +0000</pubDate>
		<dc:creator>metallica</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pieter-arntz.info/wordpressblog/?p=98</guid>
		<description><![CDATA[This is a trick I might need more often since we sometimes work with large logs. And the default size of a TextBox seems to be 32767 Code to change and check the size: Dim instance As TextBox Dim value As Integer instance.MaxLength = value value = instance.MaxLength Found that here: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.textbox.maxlength.aspx]]></description>
			<content:encoded><![CDATA[<p>This is a trick I might need more often since we sometimes work with large logs. And the default size of a TextBox seems to be 32767<br />
Code to change and check the size:</p>
<p><em>Dim instance As TextBox<br />
Dim value As Integer<br />
instance.MaxLength = value<br />
value = instance.MaxLength</em></p>
<p>Found that here: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.textbox.maxlength.aspx</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pieter-arntz.info/wordpressblog/?feed=rss2&amp;p=98</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Drag and Drop to get filepath</title>
		<link>http://www.pieter-arntz.info/wordpressblog/?p=94</link>
		<comments>http://www.pieter-arntz.info/wordpressblog/?p=94#comments</comments>
		<pubDate>Mon, 09 Feb 2009 16:04:18 +0000</pubDate>
		<dc:creator>metallica</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pieter-arntz.info/wordpressblog/?p=94</guid>
		<description><![CDATA[These pieces of code allow you to drag and drop a file into a picturebox and it will display the full path in a TextBox. Private Sub exelreader_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load &#8216;exelreader is the Form name and pb is the name of the PictureBox pb.AllowDrop = True End Sub [...]]]></description>
			<content:encoded><![CDATA[<p>These pieces of code allow you to drag and drop a file into a picturebox and it will display the full path in a TextBox.</p>
<p><em>    Private Sub exelreader_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
&#8216;exelreader is the Form name and pb is the name of the PictureBox<br />
        pb.AllowDrop = True<br />
    End Sub</p>
<p>    Private Sub pb_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles pb.DragEnter<br />
        If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then<br />
            e.Effect = DragDropEffects.Copy<br />
        End If<br />
    End Sub</p>
<p>    Private Sub pb_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles pb.DragDrop<br />
        Dim filePaths As String() = {&#8220;&#8221;}<br />
        Try<br />
            filePaths = CType(e.Data.GetData(DataFormats.FileDrop), String())<br />
        Catch ex As Exception<br />
            TextBox1.Text = ex.Message<br />
            TextBox1.Text &#038;= &#8220;Error Doing Drag/Drop&#8221;<br />
        End Try<br />
        For Each filename In filePaths<br />
            TextBox1.Text = filename<br />
        Next<br />
    End Sub</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pieter-arntz.info/wordpressblog/?feed=rss2&amp;p=94</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Convert to all CAPS</title>
		<link>http://www.pieter-arntz.info/wordpressblog/?p=89</link>
		<comments>http://www.pieter-arntz.info/wordpressblog/?p=89#comments</comments>
		<pubDate>Fri, 06 Feb 2009 14:50:57 +0000</pubDate>
		<dc:creator>metallica</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pieter-arntz.info/wordpressblog/?p=89</guid>
		<description><![CDATA[To rewrite the users input to capitals. Dim startcode As String = TextBox1.Text Dim letters As Char() Dim counter As Byte = startcode.Length Dim i As Byte = 0 If startcode &#8220;&#8221; Then letters = startcode.ToCharArray() For i = 0 To (counter &#8211; 1) letters(i) = Char.ToUpper(letters(i)) Next Dim endcode As String = letters End [...]]]></description>
			<content:encoded><![CDATA[<p>To rewrite the users input to capitals.</p>
<p><em>        Dim startcode As String = TextBox1.Text<br />
        Dim letters As Char()<br />
        Dim counter As Byte = startcode.Length<br />
        Dim i As Byte = 0<br />
        If startcode <> &#8220;&#8221; Then<br />
            letters = startcode.ToCharArray()<br />
            For i = 0 To (counter &#8211; 1)<br />
                letters(i) = Char.ToUpper(letters(i))<br />
            Next<br />
            Dim endcode As String = letters<br />
        End If</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pieter-arntz.info/wordpressblog/?feed=rss2&amp;p=89</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Add controls on the fly</title>
		<link>http://www.pieter-arntz.info/wordpressblog/?p=84</link>
		<comments>http://www.pieter-arntz.info/wordpressblog/?p=84#comments</comments>
		<pubDate>Wed, 04 Feb 2009 11:24:48 +0000</pubDate>
		<dc:creator>metallica</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pieter-arntz.info/wordpressblog/?p=84</guid>
		<description><![CDATA[To add controls to your form (for example if a condition is met) Dim RadioButton4 As New RadioButton() Dim Label12 As New Label RadioButton4.Text = &#8220;option 2&#8243; RadioButton4.Appearance = Appearance.Button RadioButton4.FlatAppearance.CheckedBackColor = Color.BlueViolet If choice = &#8220;option 2&#8243; Then RadioButton4.Checked = True End If RadioButton4.Location = New Point(287, 114) RadioButton4.Size = New Size(95, 23) Me.Controls.Add(RadioButton4) [...]]]></description>
			<content:encoded><![CDATA[<p>To add controls to your form (for example if a condition is met)</p>
<p><em>    Dim RadioButton4 As New RadioButton()<br />
    Dim Label12 As New Label<br />
        RadioButton4.Text = &#8220;option 2&#8243;<br />
        RadioButton4.Appearance = Appearance.Button<br />
        RadioButton4.FlatAppearance.CheckedBackColor = Color.BlueViolet<br />
        If choice = &#8220;option 2&#8243; Then<br />
            RadioButton4.Checked = True<br />
        End If<br />
        RadioButton4.Location = New Point(287, 114)<br />
        RadioButton4.Size = New Size(95, 23)<br />
        Me.Controls.Add(RadioButton4)</p>
<p>        Label12.Text = &#8220;explanation of choices&#8221;<br />
        Label12.Location = New Point(287, 16)<br />
        Label12.Size = New Size(95, 13)<br />
        Label12.Font = New Font(label12.Font, FontStyle.Bold)<br />
        Me.Controls.Add(Label12)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pieter-arntz.info/wordpressblog/?feed=rss2&amp;p=84</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Execute command line utilities</title>
		<link>http://www.pieter-arntz.info/wordpressblog/?p=79</link>
		<comments>http://www.pieter-arntz.info/wordpressblog/?p=79#comments</comments>
		<pubDate>Mon, 02 Feb 2009 05:31:00 +0000</pubDate>
		<dc:creator>metallica</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pieter-arntz.info/wordpressblog/?p=79</guid>
		<description><![CDATA[A very usefull set of lines if you want to make a command line utility easier to use and manipulate the output. Dim process As New Process() process.StartInfo.UseShellExecute = False process.StartInfo.FileName = path &#038; &#8220;filename.exe&#8221; process.StartInfo.CreateNoWindow = True process.StartInfo.WindowStyle = ProcessWindowStyle.Minimized Dim parameters As String = &#8221; /?&#8221; process.StartInfo.Arguments = parameters process.StartInfo.RedirectStandardOutput = True process.StartInfo.RedirectStandardError [...]]]></description>
			<content:encoded><![CDATA[<p>A very usefull set of lines if you want to make a command line utility easier to use and manipulate the output.</p>
<p><em>            Dim process As New Process()<br />
            process.StartInfo.UseShellExecute = False<br />
            process.StartInfo.FileName = path &#038; &#8220;filename.exe&#8221;<br />
            process.StartInfo.CreateNoWindow = True<br />
            process.StartInfo.WindowStyle = ProcessWindowStyle.Minimized<br />
            Dim parameters As String = &#8221; /?&#8221;<br />
            process.StartInfo.Arguments = parameters<br />
            process.StartInfo.RedirectStandardOutput = True<br />
            process.StartInfo.RedirectStandardError = True<br />
            process.Start()<br />
            Dim SR As System.IO.StreamReader = process.StandardOutput<br />
            TextBox1.Text = SR.ReadToEnd<br />
            SR.Close()</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pieter-arntz.info/wordpressblog/?feed=rss2&amp;p=79</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
