<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Timothy Tocci Tinker Shop</title>
	<atom:link href="https://timothytocci.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://timothytocci.com</link>
	<description>Browser Addons, JS, PHP, VB.NET</description>
	<lastBuildDate>Thu, 20 Nov 2025 18:30:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='timothytocci.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://secure.gravatar.com/blavatar/40471cf5a6f21494641a84a89002ebf4165ab4c5b7612deb8dd599733d5ab54a?s=96&#038;d=https%3A%2F%2Fs0.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Timothy Tocci Tinker Shop</title>
		<link>https://timothytocci.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://timothytocci.com/osd.xml" title="Timothy Tocci Tinker Shop" />
	<atom:link rel='hub' href='https://timothytocci.com/?pushpress=hub'/>
	<item>
		<title>WINDOWS 11 CONTEXT MENU REGISTRY FIX</title>
		<link>https://timothytocci.com/2025/11/20/windows-11-context-menu-registry-fix/</link>
					<comments>https://timothytocci.com/2025/11/20/windows-11-context-menu-registry-fix/#respond</comments>
		
		<dc:creator><![CDATA[timothytocci]]></dc:creator>
		<pubDate>Thu, 20 Nov 2025 18:30:04 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://timothytocci.com/?p=685</guid>

					<description><![CDATA[I don&#8217;t remember where I copied this from. Everytime I reinstall Windows 11 I go looking for this to make the context menu &#8220;normal&#8221; again.]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-code"><code>
Open the registry editor
(eg by pressing Windows + "R" and entering regedit)

Navigate to: HKEY_CURRENT_USER\Software\Classes

Right-click CLSID and select "Key" from the menu to create a new key.
Name this key {86ca1aa0-34aa-4e8b-a509-50c905bae2a2}

Right click the new key and select "Key" from the menu to create a
second new key inside the first, and name this InprocServer32

Expand InprocServer32 and double-click on "Default" in the right-hand pane.

In the resultant "Edit String" window, do not change anything and just
click on "OK".

Close the registry editor and reboot.</code></pre>



<p>I don&#8217;t remember where I copied this from. Everytime I reinstall Windows 11 I go looking for this to make the context menu &#8220;normal&#8221; again.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://timothytocci.com/2025/11/20/windows-11-context-menu-registry-fix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/63b055916f81adc2df2e711cf2edc6134f907138abd1799c75462f87f534cdf0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timothytocci</media:title>
		</media:content>
	</item>
		<item>
		<title>GetMyMusicOffOfMyIpodAndOntoMyComputer Application in VB</title>
		<link>https://timothytocci.com/2019/07/19/getmymusicoffofmyipodandontomycomputer-application-in-vb/</link>
					<comments>https://timothytocci.com/2019/07/19/getmymusicoffofmyipodandontomycomputer-application-in-vb/#respond</comments>
		
		<dc:creator><![CDATA[timothytocci]]></dc:creator>
		<pubDate>Fri, 19 Jul 2019 22:29:16 +0000</pubDate>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Explorer]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[Widget]]></category>
		<guid isPermaLink="false">http://timothytocci.com/?p=661</guid>

					<description><![CDATA[Originally this application was a console application that I developed to get the music off of my iPod. After my post on transparent forms in VIsual Basic I decided to port it to a Widget format to make it easier to use and demonstrate what goes into creating a transparent Windows Forms application...]]></description>
										<content:encoded><![CDATA[<p><img data-attachment-id="662" data-permalink="https://timothytocci.com/2019/07/19/getmymusicoffofmyipodandontomycomputer-application-in-vb/getmymusicoffofmyipod-open-graph/" data-orig-file="https://timothytocci.com/wp-content/uploads/2019/07/getmymusicoffofmyipod-open-graph.png" data-orig-size="1280,640" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="getmymusicoffofmyipod-open-graph" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2019/07/getmymusicoffofmyipod-open-graph.png?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2019/07/getmymusicoffofmyipod-open-graph.png?w=1024" class=" size-full wp-image-662 aligncenter" src="https://timothytocci.com/wp-content/uploads/2019/07/getmymusicoffofmyipod-open-graph.png" alt="getmymusicoffofmyipod-open-graph" width="1280" height="640" srcset="https://timothytocci.com/wp-content/uploads/2019/07/getmymusicoffofmyipod-open-graph.png 1280w, https://timothytocci.com/wp-content/uploads/2019/07/getmymusicoffofmyipod-open-graph.png?w=150&amp;h=75 150w, https://timothytocci.com/wp-content/uploads/2019/07/getmymusicoffofmyipod-open-graph.png?w=300&amp;h=150 300w, https://timothytocci.com/wp-content/uploads/2019/07/getmymusicoffofmyipod-open-graph.png?w=768&amp;h=384 768w, https://timothytocci.com/wp-content/uploads/2019/07/getmymusicoffofmyipod-open-graph.png?w=1024&amp;h=512 1024w" sizes="(max-width: 1280px) 100vw, 1280px" /></p>
<ul>
<li><a href="https://github.com/timtocci/GetMyMusicOffOfMyIpodAndOntoMyComputer" target="_blank" rel="noopener"><img data-attachment-id="663" data-permalink="https://timothytocci.com/2019/07/19/getmymusicoffofmyipodandontomycomputer-application-in-vb/github-mark-32px/" data-orig-file="https://timothytocci.com/wp-content/uploads/2019/07/github-mark-32px.png" data-orig-size="32,32" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="GitHub-Mark-32px" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2019/07/github-mark-32px.png?w=32" data-large-file="https://timothytocci.com/wp-content/uploads/2019/07/github-mark-32px.png?w=32" class=" size-full wp-image-663 alignnone" src="https://timothytocci.com/wp-content/uploads/2019/07/github-mark-32px.png" alt="GitHub-Mark-32px" width="32" height="32" /><strong>  Project files on Github</strong></a></li>
<li><strong><a href="https://timothytocci.s3.amazonaws.com/apps/win/GetMyMusicOffOfMyIpodSetup.msi" target="_blank" rel="noopener">Windows Installer To Try It Out Without Installing Visual Studio</a></strong></li>
</ul>
<blockquote><p>Originally this application was a console application that I developed to get the music off of my iPod. After my <a href="https://timothytocci.com/2019/04/13/transparent-forms-in-vb-net-winforms-applications/" target="_blank" rel="noopener">post on transparent forms in Visual Basic</a> I decided to port it to a Widget format to make it easier to use and demonstrate what goes into creating a transparent Windows Forms application&#8230;</p></blockquote>
<h2>Necessity Drives Innovation &#8211; The Need For This App</h2>
<p>Let&#8217;s start with the music eating iTunes application. <em>My iPod is the only music player that I have ever owned that does not make it easy to get my music files off of.</em> Even the <a href="https://www.aliexpress.com/wholesale?SearchText=music+player" target="_blank" rel="noopener">very cheapest music player</a> you can buy allows you to get your music off of the device easily. If I want to play the music on my computers&#8217; speakers I get a purchase driven interface that concentrates more on selling me something than anything else.</p>
<p>OK, enough applesauce for now. Suffice it to say, <span style="color:var(--color-text);">I</span><span style="color:var(--color-text);"> </span><em style="color:var(--color-text);">like</em><span style="color:var(--color-text);"> </span><span style="color:var(--color-text);">my iPod &#8211; I just don&#8217;t like iTunes.</span><span style="color:var(--color-text);"> I needed to get my music files off of my iPod so that I could play them on my computer without tying up a USB port. </span><span style="color:var(--color-text);">I would rather run my code than anyone else s&#8217; on my computer &#8211; so an application was born. This application does only one thing without any other options, so it&#8217;s a sure fire shoe-in for a widget.</span></p>
<h2>Creating The Background For The Application</h2>
<p><figure data-shortcode="caption" id="attachment_670" aria-describedby="caption-attachment-670" style="width: 528px" class="wp-caption aligncenter"><img data-attachment-id="670" data-permalink="https://timothytocci.com/2019/07/19/getmymusicoffofmyipodandontomycomputer-application-in-vb/ipod_start/" data-orig-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_start.gif" data-orig-size="528,435" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ipod_start" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_start.gif?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_start.gif?w=528" class=" size-full wp-image-670 aligncenter" src="https://timothytocci.com/wp-content/uploads/2019/07/ipod_start.gif" alt="ipod_start" width="528" height="435" srcset="https://timothytocci.com/wp-content/uploads/2019/07/ipod_start.gif 528w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_start.gif?w=150&amp;h=124 150w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_start.gif?w=300&amp;h=247 300w" sizes="(max-width: 528px) 100vw, 528px" /><figcaption id="caption-attachment-670" class="wp-caption-text">My transparent forms application startup screen.</figcaption></figure></p>
<p>In my opinion, transparent forms applications are really only good for developing widget style application. So the background image you choose should be relatively small. However, with modern new tablet/hybrid systems your interface should be designed to handle both desktop/laptop and tablets. Think small form size with big buttons that are easy to pluck at with your digits. Also, your application should stay the same size (width and height) throughout execution.</p>
<p>Visual Studio will automatically tile whatever image you choose for your background on the form designer by default. This will help you with the layout for the multiple panel interface you will most likely need to come up with. <span style="color:var(--color-text);">The size of your interface (form) should be the width and height of the tile in the upper left corner of the designer.</span><span style="color:var(--color-text);"> </span></p>
<p><figure data-shortcode="caption" id="attachment_664" aria-describedby="caption-attachment-664" style="width: 1621px" class="wp-caption aligncenter"><img loading="lazy" data-attachment-id="664" data-permalink="https://timothytocci.com/2019/07/19/getmymusicoffofmyipodandontomycomputer-application-in-vb/ipod_tiles_background/" data-orig-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_tiles_background.gif" data-orig-size="1621,918" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ipod_tiles_background" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_tiles_background.gif?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_tiles_background.gif?w=1024" class=" size-full wp-image-664 aligncenter" src="https://timothytocci.com/wp-content/uploads/2019/07/ipod_tiles_background.gif" alt="ipod_tiles_background" width="1621" height="918" srcset="https://timothytocci.com/wp-content/uploads/2019/07/ipod_tiles_background.gif 1621w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_tiles_background.gif?w=150&amp;h=85 150w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_tiles_background.gif?w=300&amp;h=170 300w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_tiles_background.gif?w=768&amp;h=435 768w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_tiles_background.gif?w=1024&amp;h=580 1024w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_tiles_background.gif?w=1440&amp;h=815 1440w" sizes="(max-width: 1621px) 100vw, 1621px" /><figcaption id="caption-attachment-664" class="wp-caption-text">My application background tiled in the forms designer with the panels in place.</figcaption></figure></p>
<p><span style="color:var(--color-text);">You should create as many panels as needed to hold the different UI states of your app inside of the different tiles. The tiled background gives you a chance to see what your app states UI will look like as you design them. Use the upper left tile inside of the designer to place your designed chrome buttons (min,  close etc&#8230;). Like I stated earlier, your interface should be panel based to make it easier to swap them out between application states. Simply take note of the size and location of the panel in the upper left corner tile and swap out panels assigning those values to the other panels as you need to in code. </span></p>
<p><span style="color:var(--color-text);">Beyond that, read my</span><span style="color:var(--color-text);"> </span><a href="https://timothytocci.com/2019/04/13/transparent-forms-in-vb-net-winforms-applications/" target="_blank" rel="noopener">previous post on transparent forms</a><span style="color:var(--color-text);"> </span><span style="color:var(--color-text);">for more info &#8211; it&#8217;s an easy and short read through.</span></p>
<h2>Adding Modern Application Features</h2>
<p>Windows forms applications lack some of the more modern features that their XAML based counterparts come with out of the box. One of those features, specifically the taskbar based progressbar, can be added to any winforms application with a quick visit to Nuget.</p>
<p><figure data-shortcode="caption" id="attachment_666" aria-describedby="caption-attachment-666" style="width: 1620px" class="wp-caption aligncenter"><img loading="lazy" data-attachment-id="666" data-permalink="https://timothytocci.com/2019/07/19/getmymusicoffofmyipodandontomycomputer-application-in-vb/nuget_shell/" data-orig-file="https://timothytocci.com/wp-content/uploads/2019/07/nuget_shell.png" data-orig-size="1620,865" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="nuget_shell" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2019/07/nuget_shell.png?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2019/07/nuget_shell.png?w=1024" class="alignnone size-full wp-image-666" src="https://timothytocci.com/wp-content/uploads/2019/07/nuget_shell.png" alt="nuget_shell" width="1620" height="865" srcset="https://timothytocci.com/wp-content/uploads/2019/07/nuget_shell.png 1620w, https://timothytocci.com/wp-content/uploads/2019/07/nuget_shell.png?w=150&amp;h=80 150w, https://timothytocci.com/wp-content/uploads/2019/07/nuget_shell.png?w=300&amp;h=160 300w, https://timothytocci.com/wp-content/uploads/2019/07/nuget_shell.png?w=768&amp;h=410 768w, https://timothytocci.com/wp-content/uploads/2019/07/nuget_shell.png?w=1024&amp;h=547 1024w, https://timothytocci.com/wp-content/uploads/2019/07/nuget_shell.png?w=1440&amp;h=769 1440w" sizes="(max-width: 1620px) 100vw, 1620px" /><figcaption id="caption-attachment-666" class="wp-caption-text">WindowsAPICodePack in the Nuget package manager.</figcaption></figure></p>
<p>Being able to see the progress of a long running task while the application is minimized is an important feature for an application such as this. So, with the Nuget package manager opened, search for <strong>WindowsAPICodePack</strong> and add it to your project. That package gives you all of the code pack API goodness you&#8217;ll need to implement that taskbar progressbar functionality. Coding it is pretty much like coding a regular progressbar. You just have to Import the taskbar library from that package in your form and use it.</p>
<p>Most of the time you&#8217;ll be coding something like:</p>
<pre>TaskbarManager.Instance.SetProgressState(TaskbarProgressBarState.Normal)
<span class="pl-smi">TaskbarManager.Instance.SetProgressValue(somecountingint</span><span class="pl-smi">,</span> <span class="pl-smi">somecountedint)</span>
' update somecountingint till done
TaskbarManager.Instance.SetProgressState(TaskbarProgressBarState.NoProgress)</pre>
<p>Take a look at the file on <a href="https://github.com/timtocci/GetMyMusicOffOfMyIpodAndOntoMyComputer/blob/master/GetMyMusicOffOfMyIpodAndOntoMyComputer/Form1.vb" target="_blank" rel="noopener">Github</a> to see how I coded everything.</p>
<h2>Recovering Music from an iPod in Visual Basic</h2>
<p><figure data-shortcode="caption" id="attachment_669" aria-describedby="caption-attachment-669" style="width: 535px" class="wp-caption aligncenter"><img loading="lazy" data-attachment-id="669" data-permalink="https://timothytocci.com/2019/07/19/getmymusicoffofmyipodandontomycomputer-application-in-vb/ipod_copying/" data-orig-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_copying.gif" data-orig-size="535,465" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ipod_copying" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_copying.gif?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_copying.gif?w=535" class=" size-full wp-image-669 aligncenter" src="https://timothytocci.com/wp-content/uploads/2019/07/ipod_copying.gif" alt="ipod_copying" width="535" height="465" srcset="https://timothytocci.com/wp-content/uploads/2019/07/ipod_copying.gif 535w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_copying.gif?w=150&amp;h=130 150w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_copying.gif?w=300&amp;h=261 300w" sizes="(max-width: 535px) 100vw, 535px" /><figcaption id="caption-attachment-669" class="wp-caption-text">Most of the music files on my iPod were imported from CD which iTunes turns into .m4a files instead of .mp3 files. The extended properties are the same in both cases however.</figcaption></figure></p>
<p>Recovering the music from an iPod involves reading the extended properties from the music files themselves (which is what the iPod uses). The music files on the iPod itself are contained within a hidden folder named &#8220;iPod_Control\Music&#8221; (on my iPod video). My code enumerates the connected external drives and searches for the existence of that folder. Inside that folder there are a bunch of randomly named folders &#8211; your music files exist in those folders, randomly named of course.</p>
<p>Getting the extended property values turned out to be a bit more daunting than I first thought. I searched to internet and came across a good <a href="https://stackoverflow.com/questions/26142723/get-extended-file-information-details" target="_blank" rel="noopener">stackoverflow post</a> that helped me. That code gave me problems &#8211; so it wasn&#8217;t as easy as cut and paste, but it &#8220;got the job done&#8221; in the end.</p>
<p><figure data-shortcode="caption" id="attachment_667" aria-describedby="caption-attachment-667" style="width: 1092px" class="wp-caption aligncenter"><img loading="lazy" data-attachment-id="667" data-permalink="https://timothytocci.com/2019/07/19/getmymusicoffofmyipodandontomycomputer-application-in-vb/ipod_winexplorer/" data-orig-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_winexplorer.gif" data-orig-size="1092,322" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ipod_winexplorer" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_winexplorer.gif?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_winexplorer.gif?w=1024" class="alignnone size-full wp-image-667" src="https://timothytocci.com/wp-content/uploads/2019/07/ipod_winexplorer.gif" alt="ipod_winexplorer" width="1092" height="322" srcset="https://timothytocci.com/wp-content/uploads/2019/07/ipod_winexplorer.gif 1092w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_winexplorer.gif?w=150&amp;h=44 150w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_winexplorer.gif?w=300&amp;h=88 300w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_winexplorer.gif?w=768&amp;h=226 768w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_winexplorer.gif?w=1024&amp;h=302 1024w" sizes="(max-width: 1092px) 100vw, 1092px" /><figcaption id="caption-attachment-667" class="wp-caption-text">Windows Explorer doesn&#8217;t use the Shell &#8211; it <em>IS</em> the graphical shell of the Windows OS.</figcaption></figure></p>
<p>I used the Windows Shell to parse out the extended properties of the music files and used those values to rename and sort them. I wrote a class to hold all of the information about the music files as I parsed them and made it sort-able by implementing the <strong>IEquatable</strong> and <strong>IComparable</strong> interfaces on it. See the <a href="https://github.com/timtocci/GetMyMusicOffOfMyIpodAndOntoMyComputer/blob/master/GetMyMusicOffOfMyIpodAndOntoMyComputer/SongSummary.vb" target="_blank" rel="noopener">file on GitHub</a> to see how I coded it.</p>
<h2>The About Page</h2>
<p><img loading="lazy" data-attachment-id="668" data-permalink="https://timothytocci.com/2019/07/19/getmymusicoffofmyipodandontomycomputer-application-in-vb/ipod_complete/" data-orig-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_complete.gif" data-orig-size="539,433" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ipod_complete" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_complete.gif?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod_complete.gif?w=539" class=" size-full wp-image-668 aligncenter" src="https://timothytocci.com/wp-content/uploads/2019/07/ipod_complete.gif" alt="ipod_complete" width="539" height="433" srcset="https://timothytocci.com/wp-content/uploads/2019/07/ipod_complete.gif 539w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_complete.gif?w=150&amp;h=121 150w, https://timothytocci.com/wp-content/uploads/2019/07/ipod_complete.gif?w=300&amp;h=241 300w" sizes="(max-width: 539px) 100vw, 539px" /></p>
<p>When the application completes an about pane pops up with my information. Do I use PictureBox controls with the pointer set to a hand for all of my links? You bet I do! It&#8217;s probably the easiest way to get an Internet shortcut in your Visual Basic application. Don&#8217;t forget to code the PictureBox.Click handler to open the default browser with my URLs.</p>
<pre>Dim strUrl As String = "https://someniftywebaddressgoeshere.something"
Process.Start(strUrl)</pre>
<h2>What This Application Does Not Do</h2>
<p>This application just copies the music files into the folder on the desktop. It doesn&#8217;t copy any album art or anything else other than the music files. Also, none of the files on the iPod are altered in any way.</p>
<p><figure data-shortcode="caption" id="attachment_671" aria-describedby="caption-attachment-671" style="width: 540px" class="wp-caption aligncenter"><img loading="lazy" data-attachment-id="671" data-permalink="https://timothytocci.com/2019/07/19/getmymusicoffofmyipodandontomycomputer-application-in-vb/ipod-evaluating/" data-orig-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod-evaluating.gif" data-orig-size="540,470" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ipod evaluating" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod-evaluating.gif?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2019/07/ipod-evaluating.gif?w=540" class=" size-full wp-image-671 aligncenter" src="https://timothytocci.com/wp-content/uploads/2019/07/ipod-evaluating.gif" alt="ipod evaluating" width="540" height="470" srcset="https://timothytocci.com/wp-content/uploads/2019/07/ipod-evaluating.gif 540w, https://timothytocci.com/wp-content/uploads/2019/07/ipod-evaluating.gif?w=150&amp;h=131 150w, https://timothytocci.com/wp-content/uploads/2019/07/ipod-evaluating.gif?w=300&amp;h=261 300w" sizes="(max-width: 540px) 100vw, 540px" /><figcaption id="caption-attachment-671" class="wp-caption-text">Evaluating the music files on the iPod takes an excruciatingly long time in my opinion. Everything is being done over a USB wire and it takes a toll.</figcaption></figure></p>
<h2>On Porting and Portability</h2>
<p>Most of the code can probably be moved to .NET Core 3 without a problem by removing all of the Windows specific code such as the Taskbar Progressbar code. The problems come in when you try to port the code used to read the extended properties of the music files. I&#8217;ve read that there is a way to make the code portable by using the actual byte offsets of the extended properties on the files to get the values. Maybe I&#8217;ll experiment with that at a later date. But for now, not experimenting with byte offsets seems the wisest and less frustrating path to take for me.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://timothytocci.com/2019/07/19/getmymusicoffofmyipodandontomycomputer-application-in-vb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<georss:point>42.323255 -74.423251</georss:point>
		<geo:lat>42.323255</geo:lat>
		<geo:long>-74.423251</geo:long>
		<media:thumbnail url="https://timothytocci.com/wp-content/uploads/2019/07/getmymusicoffofmyipod-open-graph.png" />
		<media:content url="https://timothytocci.com/wp-content/uploads/2019/07/getmymusicoffofmyipod-open-graph.png" medium="image">
			<media:title type="html">getmymusicoffofmyipod-open-graph</media:title>
		</media:content>

		<media:content url="https://0.gravatar.com/avatar/63b055916f81adc2df2e711cf2edc6134f907138abd1799c75462f87f534cdf0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timothytocci</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2019/07/github-mark-32px.png" medium="image">
			<media:title type="html">GitHub-Mark-32px</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2019/07/ipod_start.gif" medium="image">
			<media:title type="html">ipod_start</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2019/07/ipod_tiles_background.gif" medium="image">
			<media:title type="html">ipod_tiles_background</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2019/07/nuget_shell.png" medium="image">
			<media:title type="html">nuget_shell</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2019/07/ipod_copying.gif" medium="image">
			<media:title type="html">ipod_copying</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2019/07/ipod_winexplorer.gif" medium="image">
			<media:title type="html">ipod_winexplorer</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2019/07/ipod_complete.gif" medium="image">
			<media:title type="html">ipod_complete</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2019/07/ipod-evaluating.gif" medium="image">
			<media:title type="html">ipod evaluating</media:title>
		</media:content>
	</item>
		<item>
		<title>Transparent Forms in VB.NET WinForms Applications</title>
		<link>https://timothytocci.com/2019/04/13/transparent-forms-in-vb-net-winforms-applications/</link>
					<comments>https://timothytocci.com/2019/04/13/transparent-forms-in-vb-net-winforms-applications/#comments</comments>
		
		<dc:creator><![CDATA[timothytocci]]></dc:creator>
		<pubDate>Sat, 13 Apr 2019 22:28:26 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[winforms]]></category>
		<guid isPermaLink="false">http://timothytocci.com/?p=654</guid>

					<description><![CDATA[Creating transparent irregular shaped forms in a WinForms applications using Visual Basic is not too difficult. Using a photographic background with a transparent color, a programmer can create some really attractive interfaces.]]></description>
										<content:encoded><![CDATA[<p>Creating transparent irregular shaped forms in a WinForms applications using Visual Basic is not too difficult. Using a photographic background with a transparent color, a programmer can create some really attractive interfaces. Of course creating an interface sans the standard titlebar chrome requires a bit more work and programming. However, if you want to provide a memorable interface that is attractive as well as personalized &#8211; its worth the extra effort required.</p>
<p>&nbsp;</p>
<h2>Start With a New Windows Forms Application</h2>
<p>A few form properties need to be changed before your application form is ready for your photographic background. You&#8217;ll change these properties using the IDE (its just easier than coding).</p>
<ul>
<li>Set <strong>AutoScaleMode</strong> to <strong>None</strong></li>
<li>Set the <strong>BackColor</strong> to something like <strong>Lime</strong> or any other color that you will notice right away (<em>it shouldn&#8217;t show anywhere in the completed application</em>)</li>
<li>Set the <strong>FormBorderStyle</strong> to <strong>None</strong></li>
<li>Set the <strong>TransparencyKey</strong> to <strong>White</strong> or whatever color you desire to be transparent in your background image (<em><strong>see below</strong></em>)</li>
</ul>
<h2>Create Your Background Image</h2>
<p>Your background image should be created with the background color selected in the previous section for transparency in mind. Anything created or painted on the background image using that color will be transparent. So paint the entire background of the image with that color (on its own layer if possible).</p>
<p>Getting the transparency color exactly right in the image can become an issue (as it did for myself in the past). One version of Lime Green isn&#8217;t always someone elses version of the same color. Added to this is the fact that there is nowhere to enter or retrieve a hex color value in the IDE at all.</p>
<p>What I do is use the eyedropper tool in Photoshop on a screenshot of the IDE with the TransparencyKey property showing. This way the color is always right and I know I&#8217;ll have no problems afterward. Another way of getting it right is to simply use White as the transparency key color. In this case anywhere you would need white inside the interface you would just use an off shade of white instead. Either way you should always set up the TransparencyKey in Visual Studio first.</p>
<h2>Adding the required buttons</h2>
<p>After adding your background image to the form you have to add at least one button to the interface &#8211; the Close button. A minimize button probably wouldn&#8217;t be a bad idea eaither. Keep in mind that if you are adding a maximize button to your interface the extra effort that will be required to support it (graphics wise).</p>
<p>Keep in mind that you really don&#8217;t have to use the Button control for buttons. You can use any control that emits a Click event. I find using the Label control with the Cursor changed to a pointer is often the easiest way to get the desired effect in many cases.</p>
<p>Coding these buttons is as simple as creating the Click handler function for the button and closing the application or setting the window state.</p>
<p><img loading="lazy" data-attachment-id="658" data-permalink="https://timothytocci.com/2019/04/13/transparent-forms-in-vb-net-winforms-applications/close-button-handler/" data-orig-file="https://timothytocci.com/wp-content/uploads/2019/04/close-button-handler.gif" data-orig-size="917,169" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="close button handler" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2019/04/close-button-handler.gif?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2019/04/close-button-handler.gif?w=917" class="alignnone size-full wp-image-658" src="https://timothytocci.com/wp-content/uploads/2019/04/close-button-handler.gif" alt="close button handler" width="917" height="169" srcset="https://timothytocci.com/wp-content/uploads/2019/04/close-button-handler.gif 917w, https://timothytocci.com/wp-content/uploads/2019/04/close-button-handler.gif?w=150&amp;h=28 150w, https://timothytocci.com/wp-content/uploads/2019/04/close-button-handler.gif?w=300&amp;h=55 300w, https://timothytocci.com/wp-content/uploads/2019/04/close-button-handler.gif?w=768&amp;h=142 768w" sizes="(max-width: 917px) 100vw, 917px" /></p>
<h2>Making the form draggable</h2>
<p>Coding the form to be draggable in Visual Basic is a bit easier than most think. Most of the time I create small, widget like applications when I use transparent forms. Applications like these should be easy to move around so I make the entire form draggable. If you are working on something larger the methodology is pretty much the same except for the fact that you&#8217;ll be coding it to a specific part of the form (for instance a custom titlebar &#8211; you code the extra math) instead of the entire form.</p>
<p>I use one form global to hold the initial MouseDown location on the form which is considered the offset (remember you&#8217;re moving the entire form). In the MouseMove event handler you change the Location property by subtracting that offset from the cursor location and setting it. In the MouseUp event handler  you just set the form global to nothing this way it can be used as a check in the MouseMove event handler.</p>
<p><img loading="lazy" data-attachment-id="653" data-permalink="https://timothytocci.com/mouse-move-code/" data-orig-file="https://timothytocci.com/wp-content/uploads/2019/04/mouse-move-code.gif" data-orig-size="1026,347" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="mouse move code" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2019/04/mouse-move-code.gif?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2019/04/mouse-move-code.gif?w=1024" class="alignnone size-full wp-image-653" src="https://timothytocci.com/wp-content/uploads/2019/04/mouse-move-code.gif" alt="mouse move code" width="1026" height="347" srcset="https://timothytocci.com/wp-content/uploads/2019/04/mouse-move-code.gif 1026w, https://timothytocci.com/wp-content/uploads/2019/04/mouse-move-code.gif?w=150&amp;h=51 150w, https://timothytocci.com/wp-content/uploads/2019/04/mouse-move-code.gif?w=300&amp;h=101 300w, https://timothytocci.com/wp-content/uploads/2019/04/mouse-move-code.gif?w=768&amp;h=260 768w" sizes="(max-width: 1026px) 100vw, 1026px" /></p>
<h2>Finally</h2>
<p>Although creating a basic transparent form application seems simple at first glance, your project can get complicated quickly. The more functionality you want, the more things can get more tedious. Creating a maximize button means you&#8217;ll have to work out horizontal and vertical tiling on the form and certain components. A custom titlebar means more math in the mouse handler functions. If your application has a lot of animations, perhaps the project should be moved to a XAML imterface instead.</p>
<p>Still, if you&#8217;re after a custom look and feel for your app &#8211; there&#8217;s no better start than a transparent form with a photographic background.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://timothytocci.com/2019/04/13/transparent-forms-in-vb-net-winforms-applications/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		
		<media:thumbnail url="https://timothytocci.com/wp-content/uploads/2019/04/borderless-form.gif" />
		<media:content url="https://timothytocci.com/wp-content/uploads/2019/04/borderless-form.gif" medium="image">
			<media:title type="html">borderless form</media:title>
		</media:content>

		<media:content url="https://0.gravatar.com/avatar/63b055916f81adc2df2e711cf2edc6134f907138abd1799c75462f87f534cdf0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timothytocci</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2019/04/close-button-handler.gif" medium="image">
			<media:title type="html">close button handler</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2019/04/mouse-move-code.gif" medium="image">
			<media:title type="html">mouse move code</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8230;This is Next Gen Windows 10 in 2016</title>
		<link>https://timothytocci.com/2018/02/01/this-is-next-gen-windows-10-in-2016/</link>
					<comments>https://timothytocci.com/2018/02/01/this-is-next-gen-windows-10-in-2016/#respond</comments>
		
		<dc:creator><![CDATA[timothytocci]]></dc:creator>
		<pubDate>Thu, 01 Feb 2018 13:46:26 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Tiles]]></category>
		<category><![CDATA[Universal Windows Platform]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[UWP]]></category>
		<guid isPermaLink="false">http://timothytocci.com/?p=642</guid>

					<description><![CDATA[&#8230;It&#8217;s 2018 now and we&#8217;ve all been waiting for Interactive Live Tiles. If you ask me, all these feature should have been in the anniversary release. I&#8217;m starting to wonder if they&#8217;re even going to make it to release at this point. Having the capability to put a miniaturized interface on the Start menu through [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><span class="embed-youtube" style="text-align:center; display: block;"><iframe class="youtube-player" width="640" height="360" src="https://www.youtube.com/embed/gqA0bIXee3Y?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe></span></p>
<p>&#8230;It&#8217;s 2018 now and we&#8217;ve all been waiting for <a href="https://docs.microsoft.com/en-us/search/index?search=Interactive+Live+Tiles" target="_blank" rel="noopener">Interactive Live Tiles</a>. If you ask me, all these feature should have been in the anniversary release. I&#8217;m starting to wonder if they&#8217;re even going to make it to release at this point. Having the capability to put a miniaturized interface on the Start menu through an expando button can go far in my opinion.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://timothytocci.com/2018/02/01/this-is-next-gen-windows-10-in-2016/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/63b055916f81adc2df2e711cf2edc6134f907138abd1799c75462f87f534cdf0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timothytocci</media:title>
		</media:content>
	</item>
		<item>
		<title>FileSystemWatcher Class in VB.NET</title>
		<link>https://timothytocci.com/2017/09/28/filesystemwatcher-in-vb-net/</link>
					<comments>https://timothytocci.com/2017/09/28/filesystemwatcher-in-vb-net/#respond</comments>
		
		<dc:creator><![CDATA[timothytocci]]></dc:creator>
		<pubDate>Thu, 28 Sep 2017 12:23:26 +0000</pubDate>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[Windows 10]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows 8]]></category>
		<category><![CDATA[\]]></category>
		<guid isPermaLink="false">http://timothytocci.com/?p=639</guid>

					<description><![CDATA[&#160; Just a quick post on using the Microsoft file system watcher component in the .Net framework with Visual Basic. Utilizing the Microsoft file system watcher component in .Net with Visual Basic, you&#8217;re able to watch a directory structure for changes to its contents and respond with Visual Basic code. Using the.net file watching component [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>
<p><figure data-shortcode="caption" id="attachment_638" aria-describedby="caption-attachment-638" style="width: 720px" class="wp-caption aligncenter"><img loading="lazy" data-attachment-id="638" data-permalink="https://timothytocci.com/?attachment_id=638" data-orig-file="https://timothytocci.com/wp-content/uploads/2017/09/fsw-in-vb-example.gif" data-orig-size="969,558" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="FileSystemWatcher in VB Example" data-image-description="&lt;p&gt;FileSystemWatcher in VB Example&lt;/p&gt;
" data-image-caption="&lt;p&gt;FileSystemWatcher in VB Example&lt;/p&gt;
" data-medium-file="https://timothytocci.com/wp-content/uploads/2017/09/fsw-in-vb-example.gif?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2017/09/fsw-in-vb-example.gif?w=969" class="size-full wp-image-638" src="https://timothytocci.com/wp-content/uploads/2017/09/fsw-in-vb-example.gif" alt="FileSystemWatcher in VB Example" width="720" height="415" srcset="https://timothytocci.com/wp-content/uploads/2017/09/fsw-in-vb-example.gif?w=720&amp;h=415 720w, https://timothytocci.com/wp-content/uploads/2017/09/fsw-in-vb-example.gif?w=150&amp;h=86 150w, https://timothytocci.com/wp-content/uploads/2017/09/fsw-in-vb-example.gif?w=300&amp;h=173 300w, https://timothytocci.com/wp-content/uploads/2017/09/fsw-in-vb-example.gif?w=768&amp;h=442 768w, https://timothytocci.com/wp-content/uploads/2017/09/fsw-in-vb-example.gif 969w" sizes="(max-width: 720px) 100vw, 720px" /><figcaption id="caption-attachment-638" class="wp-caption-text">FileSystemWatcher in VB Example</figcaption></figure></p>
<p>Just a quick post on using the Microsoft file system watcher component in the .Net framework with Visual Basic. Utilizing the Microsoft file system watcher component in .Net with Visual Basic, you&#8217;re able to watch a directory structure for changes to its contents and respond with Visual Basic code.</p>
<p>Using the.net file watching component is pretty simple on the surface. Microsoft provides enough example code in their documentation to give any new user a great head start. Basically, to use the file system watcher component you have to first set permissions to full trust, create a new file system watcher object, set its properties, create handlers for the events the file system watcher object raises, and then set it to enable raising events.</p>
<p>When I first started tinkering around with the file system watcher component everything worked as expected. I did, after watching the events closely, come across one caveat. If you set the file system watcher object to include subdirectories, when you delete a subdirectory that has files contained in it the event raised by the file system watcher will only show the event for that subdirectory being deleted not for any of the files contained in that directory. This makes it a bit more difficult to keep track of the directory structure.</p>
<p>My solution was to create a list in order to compare file paths of the files contained in the folder to the path of the sub folder being deleted. Eventually, I found it easier to break this functionality off into a new class that I could adapt for reuse. I felt that using a list to keep track of the folders and files was better for performance then re-parsing the file system every time a subfolder was deleted. I wrote a simple dialog project for demonstration purposes that <a href="https://github.com/timtocci/FileSystemWatcher-in-VB-Example" target="_blank" rel="noopener">I&#8217;ll post on github</a> so that you can check out the code.</p>
<p>&nbsp;</p>
<p><strong>Reference:</strong></p>
<p><a href="https://docs.microsoft.com/en-us/dotnet/api/system.io?view=netframework-4.7" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/dotnet/api/system.io?view=netframework-4.7</a></p>
<p><a href="https://docs.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher?view=netframework-4.7" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher?view=netframework-4.7</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a href="https://github.com/timtocci/FileSystemWatcher-in-VB-Example" target="_blank" rel="noopener">Example Code</a> on Github</h3>
<pre class="brush: vb; title: ; notranslate">
Imports System.IO
Imports System.Security
Imports System.Security.Permissions

''' &lt;summary&gt;
''' Singleton that initializes and handles file watcher changes
''' &lt;/summary&gt;

&lt;CLSCompliant(True)&gt; Public Class MyDirectory
    Public Shared Event Change(path As String)
    Public Shared Event Create(path As String)
    Public Shared Event Delete(path As String)
    Public Shared Event Renamed(oldpath As String, newpath As String)
    Private Shared watched As String
    Private Shared retList As List(Of String)
    Public Shared ReadOnly Property Count As Integer
        Get
            Return retList.Count
        End Get
    End Property
    Private Sub New()
    End Sub
    Public Shared Function ListDirectory(path As String) As List(Of String)
        retList = New List(Of String)
        watched = path
        Try
            Dim di As DirectoryInfo = New DirectoryInfo(path)
            For Each file In di.EnumerateFiles(&quot;*&quot;, SearchOption.AllDirectories)
                retList.Add(file.FullName)
            Next
            For Each folder In di.EnumerateDirectories(&quot;*&quot;, SearchOption.AllDirectories)
                retList.Add(folder.FullName)
            Next
        Catch ex As DirectoryNotFoundException
            Console.WriteLine(&quot;Directory not found: {0}&quot;, ex.Message)
        Catch ex As SecurityException
            Console.WriteLine(&quot;Security Exception:\n\n{0}&quot;, ex.Message)
        Catch ex As Exception
            Console.WriteLine(&quot;Exception occurred: {0}&quot;, ex.Message)
        End Try
        Return retList
    End Function
    &lt;PermissionSet(SecurityAction.Demand, Name:=&quot;FullTrust&quot;)&gt;
    Public Shared Sub WatchDirectory(path As String)
        Dim fswatcher As New FileSystemWatcher
        fswatcher.IncludeSubdirectories = True
        fswatcher.Path = path
        fswatcher.Filter = &quot;&quot;
        AddHandler fswatcher.Changed, AddressOf onChanged
        AddHandler fswatcher.Created, AddressOf onCreated
        AddHandler fswatcher.Deleted, AddressOf onDeleted
        AddHandler fswatcher.Renamed, AddressOf onRenamed
        fswatcher.EnableRaisingEvents = True
    End Sub
    Private Shared Sub onChanged(src As Object, evt As FileSystemEventArgs)
        RaiseEvent Change(evt.FullPath)
    End Sub
    Private Shared Sub onDeleted(src As Object, evt As FileSystemEventArgs)
        Dim tList As List(Of String) = New List(Of String)
        Dim thepath As String = evt.FullPath
        For Each path As String In retList
            If path.StartsWith(thepath) Then
                tList.Add(path)
            End If
        Next
        For Each path As String In tList
            retList.Remove(path)
            RaiseEvent Delete(path)
        Next
    End Sub
    Private Shared Sub onCreated(src As Object, evt As FileSystemEventArgs)
        retList.Add(evt.FullPath)
        RaiseEvent Create(evt.FullPath)
    End Sub
    Private Shared Sub onRenamed(src As Object, evt As RenamedEventArgs)
        Dim thepath As String = evt.OldFullPath
        Dim fname As String = &quot;&quot;
        Dim dicRename As Dictionary(Of String, String) = New Dictionary(Of String, String)
        For Each path As String In retList
            If path.StartsWith(thepath) Then
                If Equals(path, thepath) Then
                    dicRename.Add(path, evt.FullPath)
                Else
                    fname = path.Substring(path.LastIndexOf(&quot;\&quot;) + 1)
                    dicRename.Add(path, evt.FullPath &amp; &quot;\&quot; &amp; fname)
                End If
            End If
        Next
        For Each KVPair As KeyValuePair(Of String, String) In dicRename
            retList.Remove(KVPair.Key)
            retList.Add(KVPair.Value)
            'Console.WriteLine(&quot;Renamed from: {0} \n To: {1}&quot;, KVPair.Key, KVPair.Value)
            RaiseEvent Renamed(KVPair.Key, KVPair.Value)
        Next
    End Sub
End Class

</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://timothytocci.com/2017/09/28/filesystemwatcher-in-vb-net/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/63b055916f81adc2df2e711cf2edc6134f907138abd1799c75462f87f534cdf0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timothytocci</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2017/09/fsw-in-vb-example.gif" medium="image">
			<media:title type="html">FileSystemWatcher in VB Example</media:title>
		</media:content>
	</item>
		<item>
		<title>Synchronous Delegate in VB.NET</title>
		<link>https://timothytocci.com/2017/07/15/synchronous-delegate-in-vb-net/</link>
					<comments>https://timothytocci.com/2017/07/15/synchronous-delegate-in-vb-net/#respond</comments>
		
		<dc:creator><![CDATA[timothytocci]]></dc:creator>
		<pubDate>Sat, 15 Jul 2017 22:57:32 +0000</pubDate>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[Windows 10]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows 8]]></category>
		<category><![CDATA[\]]></category>
		<guid isPermaLink="false">http://timothytocci.com/?p=622</guid>

					<description><![CDATA[I didn&#8217;t know why I would need one either until the need came up (&#8220;Oh no, my UI is on a different thread!&#8221;). Delegates are described as similar to function pointers in C++ in the Microsoft documentation. When I read that I said to myself &#8220;yeah, but Visual Basic doesn&#8217;t work like that wonderful and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I didn&#8217;t know why I would need one either until the need came up (&#8220;Oh no, my UI is on a different thread!&#8221;). <a href="https://docs.microsoft.com/en-us/dotnet/api/system.delegate?view=netframework-4.7">Delegates</a> are described as similar to function pointers in C++ in the Microsoft documentation. When I read that I said to myself &#8220;yeah, but Visual Basic doesn&#8217;t work like that wonderful and painfully frustrating language that AT&amp;T invented so long ago&#8221;. So Microsoft still has to learn that Chinese is painful if you&#8217;re not from China. I&#8217;m discovering in the new VB, it does kinda work like that &#8211; a little.</p>
<p>In my case I had a shared class and a form that were working together. My class raised an event that was handled on the form to update a control on the form. The event also had parameters that were passed with the event to the event handler on the form. When the handler was invoked I received an exception that stated the control I was accessing was on another thread. I didn&#8217;t have to deal with this in the old VB under &#8216;normal&#8217; circumstances. If I did I would have to be the C++ programmer working in VB &#8211; and that would have been considered a work around at best. So this is vast new territory for me, and I apologize ahead of time if something isn&#8217;t perfect. And yes, its a Windows Forms project with no XAML.</p>
<h3>So&#8230; How To</h3>
<p>Conceptually, you have to create a <a href="https://docs.microsoft.com/en-us/dotnet/api/system.delegate?view=netframework-4.7">Delegate</a> (a function pointer in C++) for your method (yeah, the one that updates the control) that gets used (dereferenced and called) by the user control <a href="https://msdn.microsoft.com/en-us/library/zyzhdc6b(v=vs.110).aspx">Invoke</a> method which invokes the method (yeah, that one) on its thread. On an aside, don&#8217;t ask why I think Microsoft put a C++ programmer in charge of Visual Basic NET. However, I&#8217;m taking the bad with the good here &#8211; the new Thread way is <em>really powerful</em> in my opinion. I just really would have preferred this kind of &#8216;icky&#8217; stuff to be abstracted away. I guess you can&#8217;t have that multi-thread evil at Microsoft with VB without a bit of &#8216;ick&#8217;. In other words, I can&#8217;t help but to be critical; it&#8217;s still kind of &#8216;hakish&#8217; if you ask me.</p>
<p>OK, as I stated earlier, the event was handled on a form to update a control on the form. The first thing to do is to declare a <a href="https://docs.microsoft.com/en-us/dotnet/api/system.delegate?view=netframework-4.7">Delegate</a> at the top after the opening of the form class. The declaration is similar to an interface declaration in that there is no body to the declaration, just the function (or method) signature. Name the <a href="https://docs.microsoft.com/en-us/dotnet/api/system.delegate?view=netframework-4.7">Delegate</a> something like <strong>controlUpdateDelegate</strong>. Now go and code the <strong>controlUpdate</strong> method, which should be easy considering its probably the same code you wrote in your original handler. Now, in the original event handler, you&#8217;ll need to start an If block that tests for the control you&#8217;re updating <a href="https://msdn.microsoft.com/en-us/library/system.windows.forms.control.invokerequired(v=vs.110).aspx">InvokeRequired</a> property (no autocomplete from the IDE unfortunately). If that boolean is true you have to create a New <a href="https://docs.microsoft.com/en-us/dotnet/api/system.delegate?view=netframework-4.7">Delegate</a> (updateControlDelegate) with the AddressOf the function you wrote to update the control (controlUpdate). After that you have to call that controls (the one you&#8217;re updating) <a href="https://msdn.microsoft.com/en-us/library/zyzhdc6b(v=vs.110).aspx">Invoke</a> method with the <a href="https://docs.microsoft.com/en-us/dotnet/api/system.delegate?view=netframework-4.7">Delegate</a> you created and the parameters you originally sent to the event handler. If that <a href="https://msdn.microsoft.com/en-us/library/system.windows.forms.control.invokerequired(v=vs.110).aspx">InvokeRequired</a> boolean is false just call that method you created.</p>
<p>That&#8217;s it &#8211; that&#8217;s what worked for me.</p>
<h3>Some Example Code Structure</h3>
<pre class="brush: vb; title: ; notranslate">
' on the form is someControlPublic 
Class someForm
 Public Delegate Sub controlUpdateDelegate(someParam as String) 

 Public Sub New()
   AddHandler someClass.coolEvent, AddressOf  coolEventHappened
   someClass.doSomethingCool()
 End Sub

 Private Sub coolEventHappened(someParam As String)
   If someControl.InvokeRequired Then
     Dim del = New controlUpdateDelegate(AddressOf controlUpdate)
     someControl.Invoke(del, someParam)
   Else 
     controlUpdate(someParam)
   End If
 End Sub

 Private Sub controlUpdate(someParam As String)
 ' update someControl here with someParam
 End Sub
End Class

Public Class someClass
  Public Shared Event coolEvent(someParam As String) 

  Public Shared Sub doSomethingCool() 
    RaiseEvent coolEvent(&quot;Cool!&quot;) 
  End Sub

End Class.
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://timothytocci.com/2017/07/15/synchronous-delegate-in-vb-net/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/63b055916f81adc2df2e711cf2edc6134f907138abd1799c75462f87f534cdf0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timothytocci</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting System Information With WMI and VB.NET</title>
		<link>https://timothytocci.com/2017/07/05/getting-system-information-with-wmi-and-vb-net/</link>
					<comments>https://timothytocci.com/2017/07/05/getting-system-information-with-wmi-and-vb-net/#respond</comments>
		
		<dc:creator><![CDATA[timothytocci]]></dc:creator>
		<pubDate>Wed, 05 Jul 2017 18:15:58 +0000</pubDate>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Windows 10]]></category>
		<category><![CDATA[Windows 7]]></category>
		<guid isPermaLink="false">http://timothytocci.com/?p=583</guid>

					<description><![CDATA[I&#8217;ve been getting back into developing with Visual Basic lately. I&#8217;ve learned much of what I need to know in the past while in college; or so I thought. Much has changed since those days of Visual Basic 6. Everything is done a bit differently now using dot NET. Before, everything was Component Object Model [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><figure data-shortcode="caption" id="attachment_586" aria-describedby="caption-attachment-586" style="width: 419px" class="wp-caption aligncenter"><img loading="lazy" data-attachment-id="586" data-permalink="https://timothytocci.com/2017/07/05/getting-system-information-with-wmi-and-vb-net/35608522201_0687ca50aa_o/" data-orig-file="https://timothytocci.com/wp-content/uploads/2017/07/35608522201_0687ca50aa_o.png" data-orig-size="419,461" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="35608522201_0687ca50aa_o" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2017/07/35608522201_0687ca50aa_o.png?w=273" data-large-file="https://timothytocci.com/wp-content/uploads/2017/07/35608522201_0687ca50aa_o.png?w=419" class=" size-full wp-image-586 aligncenter" src="https://timothytocci.com/wp-content/uploads/2017/07/35608522201_0687ca50aa_o.png" alt="35608522201_0687ca50aa_o" width="419" height="461" srcset="https://timothytocci.com/wp-content/uploads/2017/07/35608522201_0687ca50aa_o.png 419w, https://timothytocci.com/wp-content/uploads/2017/07/35608522201_0687ca50aa_o.png?w=136&amp;h=150 136w, https://timothytocci.com/wp-content/uploads/2017/07/35608522201_0687ca50aa_o.png?w=273&amp;h=300 273w" sizes="(max-width: 419px) 100vw, 419px" /><figcaption id="caption-attachment-586" class="wp-caption-text">Machine Information app</figcaption></figure></p>
<p>I&#8217;ve been getting back into developing with Visual Basic lately. I&#8217;ve learned much of what I need to know in the past while in college; or so I thought. Much has changed since those days of Visual Basic 6. Everything is done a bit differently now using dot NET. Before, everything was Component Object Model components &#8211; and I really liked Visual Basic 6 for making it easier to develop those type of components. ActiveX controls, servers, hell &#8211; even application documents that ran inside of Internet Explorer was just easier to develop with VB than anything else. The Visual Basic runtime dll was in charge of running a lot of business infrastructure in the past.</p>
<p>Now a days its the mighty ubiquitious framework called Dot Net that drives business development. Made up of a huge collection of classes, dot NET is central to every language that runs on Microsoft. Even C++ developers write managed code these days. Instead of a runtime dll we get the Common Language Runtime, which interprets code written in any Microsoft language and churns out a bit of Intermediate Language that runs on a virtual machine. While its true that almost everything I am doing in VB now is a learning experience I see the value in this managed code base already; a lot just got easier.</p>
<p>One of the wisest decisions Microsoft has made recently was the release of the Community Edition of Visual Studio. A corresponding version of Microsofts flagship IDE used to cost a fortune in the past. Now, for the lone developer, its free to download and code with &#8211; great! All the code here is written and compiled with this IDE so download it and give it a try.</p>
<p><figure data-shortcode="caption" id="attachment_590" aria-describedby="caption-attachment-590" style="width: 1434px" class="wp-caption aligncenter"><img loading="lazy" data-attachment-id="590" data-permalink="https://timothytocci.com/2017/07/05/getting-system-information-with-wmi-and-vb-net/35570506482_ca1635cb8f_o/" data-orig-file="https://timothytocci.com/wp-content/uploads/2017/07/35570506482_ca1635cb8f_o.png" data-orig-size="1434,954" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="35570506482_ca1635cb8f_o" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2017/07/35570506482_ca1635cb8f_o.png?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2017/07/35570506482_ca1635cb8f_o.png?w=1024" class=" size-full wp-image-590 aligncenter" src="https://timothytocci.com/wp-content/uploads/2017/07/35570506482_ca1635cb8f_o.png" alt="35570506482_ca1635cb8f_o" width="1434" height="954" srcset="https://timothytocci.com/wp-content/uploads/2017/07/35570506482_ca1635cb8f_o.png 1434w, https://timothytocci.com/wp-content/uploads/2017/07/35570506482_ca1635cb8f_o.png?w=150&amp;h=100 150w, https://timothytocci.com/wp-content/uploads/2017/07/35570506482_ca1635cb8f_o.png?w=300&amp;h=200 300w, https://timothytocci.com/wp-content/uploads/2017/07/35570506482_ca1635cb8f_o.png?w=768&amp;h=511 768w, https://timothytocci.com/wp-content/uploads/2017/07/35570506482_ca1635cb8f_o.png?w=1024&amp;h=681 1024w" sizes="(max-width: 1434px) 100vw, 1434px" /><figcaption id="caption-attachment-590" class="wp-caption-text">Explicitly adding the System.Management assembly reference to my project</figcaption></figure></p>
<p>Getting system information by querying into the Windows Management Instrumentation system isn&#8217;t that difficult. Setting up the project to use the namespace was out of the ordinary &#8211; you have to explicitly add the reference to the System.Management namespace assembly to the project. There will be no help from the IDE with this. So you have to go to the Project properties page, click on References in the left column, hit the Add button, click on Assemblies-&gt;Framework in the left column, go down to the System.Management namespace and make sure the checkbox is checked. The same goes for the System.ServiceProcess namespace if you&#8217;re going to look at the running services as I have.</p>
<p>Basically, I&#8217;ve been working off of Microsoft code examples to get to where I am with this. To query WMI you set up and use a ManagementObjectSearcher class with your query and then iterate over the results. The sample application turns the query results into a List of string Dictionaries. Most of the time you&#8217;ll want to do a custom query to retrieve the specific information you desire instead of returning entire classes of information the way I have in the example application. Also, the queries take time more time than you might be used to, and this may become a problem. Using a separate thread to run your queries will improve response time. For instance I get a ContextSwitchDeadlock Exception if I do not run the Product query on a separate thread.</p>
<p>Why do the application at all? The one problem I have had is remembering the exact members of the different WMI classes I am querying for. The example app returns the entire class, or array of classes, with null values turned into empty strings for reference sake. It should be enough to get anyone started with building and testing the exact query they need.</p>
<p>There are dozens of scenarios where you would want to glean a bit of information from the System.Management namespace. Hopefully this example can help you on your way.</p>
<p><strong>Download Links:</strong></p>
<h3><a href="https://github.com/timtocci/Machine-Information/blob/master/MachineInfo/MachineInfo/bin/Debug/MachineInfo.exe">MachineInfo.exe</a></h3>
<h3><a href="https://github.com/timtocci/Machine-Information" target="_blank" rel="noopener">Entire Project on GitHub</a></h3>
<p><strong>References:</strong></p>
<ul>
<li><strong><a href="https://msdn.microsoft.com/en-us/library/bb404655.aspx" target="_blank" rel="noopener">WMI .NET Overview</a></strong></li>
<li><strong><a href="https://msdn.microsoft.com/en-us/library/aa393964(v=vs.85).aspx" target="_blank" rel="noopener">Using WMI</a></strong></li>
<li><strong><a href="https://msdn.microsoft.com/en-us/library/system.management.managementobject(v=vs.110).aspx" target="_blank" rel="noopener">ManagementObject Class</a></strong></li>
<li><strong><a href="https://msdn.microsoft.com/en-us/library/system.management.managementobjectsearcher(v=vs.110).aspx" target="_blank" rel="noopener">ManagementObjectSearcher Class</a></strong></li>
<li><strong><a href="https://msdn.microsoft.com/en-us/library/system.serviceprocess.servicecontroller(v=vs.110).aspx" target="_blank" rel="noopener">ServiceController Class</a></strong></li>
<li><strong><a href="https://www.visualstudio.com/downloads/" target="_blank" rel="noopener">Visual Studio Community 2017 Download</a></strong></li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://timothytocci.com/2017/07/05/getting-system-information-with-wmi-and-vb-net/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:thumbnail url="https://timothytocci.com/wp-content/uploads/2017/07/35608522201_0687ca50aa_o.png" />
		<media:content url="https://timothytocci.com/wp-content/uploads/2017/07/35608522201_0687ca50aa_o.png" medium="image">
			<media:title type="html">35608522201_0687ca50aa_o</media:title>
		</media:content>

		<media:content url="https://0.gravatar.com/avatar/63b055916f81adc2df2e711cf2edc6134f907138abd1799c75462f87f534cdf0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timothytocci</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2017/07/35570506482_ca1635cb8f_o.png" medium="image">
			<media:title type="html">35570506482_ca1635cb8f_o</media:title>
		</media:content>
	</item>
		<item>
		<title>Preview File Types as Text in Preview Pane in Windows Explorer on Windows 10, 8, 7, and Vista</title>
		<link>https://timothytocci.com/2017/06/23/preview-file-types-as-text-in-preview-pane-in-windows-explorer-on-windows-10-8-7-and-vista/</link>
					<comments>https://timothytocci.com/2017/06/23/preview-file-types-as-text-in-preview-pane-in-windows-explorer-on-windows-10-8-7-and-vista/#comments</comments>
		
		<dc:creator><![CDATA[timothytocci]]></dc:creator>
		<pubDate>Fri, 23 Jun 2017 18:23:39 +0000</pubDate>
				<category><![CDATA[Explorer]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Preview Pane]]></category>
		<category><![CDATA[Windows 10]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows 8]]></category>
		<category><![CDATA[windows explorer]]></category>
		<category><![CDATA[Windows Vista]]></category>
		<guid isPermaLink="false">http://timothytocci.com/?p=564</guid>

					<description><![CDATA[Setting the preview pane to view a filetype as text is as simple as setting a couple of registry keys.]]></description>
										<content:encoded><![CDATA[<p><figure data-shortcode="caption" id="attachment_567" aria-describedby="caption-attachment-567" style="width: 1025px" class="wp-caption alignnone"><img loading="lazy" data-attachment-id="567" data-permalink="https://timothytocci.com/2017/06/23/preview-file-types-as-text-in-preview-pane-in-windows-explorer-on-windows-10-8-7-and-vista/35321504842_fd27e533ef_o/" data-orig-file="https://timothytocci.com/wp-content/uploads/2017/06/35321504842_fd27e533ef_o.png" data-orig-size="1025,560" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="35321504842_fd27e533ef_o" data-image-description="" data-image-caption="" data-medium-file="https://timothytocci.com/wp-content/uploads/2017/06/35321504842_fd27e533ef_o.png?w=300" data-large-file="https://timothytocci.com/wp-content/uploads/2017/06/35321504842_fd27e533ef_o.png?w=1024" class="alignnone size-full wp-image-567" src="https://timothytocci.com/wp-content/uploads/2017/06/35321504842_fd27e533ef_o.png" alt="35321504842_fd27e533ef_o" width="1025" height="560" srcset="https://timothytocci.com/wp-content/uploads/2017/06/35321504842_fd27e533ef_o.png 1025w, https://timothytocci.com/wp-content/uploads/2017/06/35321504842_fd27e533ef_o.png?w=150&amp;h=82 150w, https://timothytocci.com/wp-content/uploads/2017/06/35321504842_fd27e533ef_o.png?w=300&amp;h=164 300w, https://timothytocci.com/wp-content/uploads/2017/06/35321504842_fd27e533ef_o.png?w=768&amp;h=420 768w" sizes="(max-width: 1025px) 100vw, 1025px" /><figcaption id="caption-attachment-567" class="wp-caption-text">Visual Basic file shown in the preview pan in Windows Explorer (file from the tutorial <a href="https://www.codeproject.com/Articles/3192/Watching-Folder-Activity-in-VB-NET" target="_blank" rel="noopener">here</a>)</figcaption></figure></p>
<p>If you use Windows the way I do you use the Windows Explorer Preview pane to look at text based files. Why? Because it’s just easier that way. Most of the time I have to look back at files to see exactly how I pulled something off in the past. If it wasn’t for the preview pane I would have to open that file up in whatever editor is associated with it. That takes more time.</p>
<p>Setting the preview pane to view a filetype as text is as simple as setting a couple of registry keys. The average user really shouldn’t alter the Windows Registry without knowing what they’re doing as it could render the system unusable. There’s a registry script that can be altered for any file type at the end of the post.</p>
<p>The new, more modern “Windows 10”, way of setting the preview pane to show a filetype as text is by setting two string subkeys on the filetype in HKEY_CLASSES_ROOT. Setting the subkeys “Content Type” to “text/plain”, and “PerceivedType” to “text” usually works for most filetypes. This worked like a charm for my “.json” problem.</p>
<p>However, that isn’t always the case as I found out when tried to preview a Visual Basic filetype. I just expected it to work because I have the most recent version of Visual Studio installed on my system.  So, once again, I opened up REGEDIT and looked at the “.vb” key. I discovered the two previously mentioned subkeys were already set properly.</p>
<p>After trolling the Internet (for too long I might add) I discovered the “old” way. There is another key that needs to be set on the filetype in the Registry. You have to add a special GUID key to the “shellex” key below the filetype and set that with another special GUID (which I assume is the GUID for the Preview Handler for text files). The old way worked for me.</p>
<p>The registry script is set up to set all of these keys. Yeah, the dead keys might add a teensy bit to the Registry size – so it’s opinionated. It’s better to have everything in one place than not. Do I think programmers that invent a new text based filetype for their apps should set these keys? Absolutely, if they’re not going to write a Preview Handler shell extension.</p>
<p>Just replace the “.vb” extension to whatever filetype you want to preview as text.</p>
<p><a href="https://timothytocci.s3.amazonaws.com/Set Preview Handler for VB.reg">Download</a></p>
<pre class="brush: plain; title: ; notranslate">
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.vb]
&quot;Content Type&quot;=&quot;text/plain&quot;
&quot;PerceivedType&quot;=&quot;text&quot;

[HKEY_CLASSES_ROOT\.vb\shellex]

[HKEY_CLASSES_ROOT\.vb\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@=&quot;{1531d583-8375-4d3f-b5fb-d23bbd169f22}&quot;
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://timothytocci.com/2017/06/23/preview-file-types-as-text-in-preview-pane-in-windows-explorer-on-windows-10-8-7-and-vista/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/63b055916f81adc2df2e711cf2edc6134f907138abd1799c75462f87f534cdf0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timothytocci</media:title>
		</media:content>

		<media:content url="https://timothytocci.com/wp-content/uploads/2017/06/35321504842_fd27e533ef_o.png" medium="image">
			<media:title type="html">35321504842_fd27e533ef_o</media:title>
		</media:content>
	</item>
		<item>
		<title>Overriding Backbone.sync for local use</title>
		<link>https://timothytocci.com/2017/06/09/overriding-backbone-sync-for-local-use/</link>
					<comments>https://timothytocci.com/2017/06/09/overriding-backbone-sync-for-local-use/#respond</comments>
		
		<dc:creator><![CDATA[timothytocci]]></dc:creator>
		<pubDate>Fri, 09 Jun 2017 19:03:06 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[backbone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<guid isPermaLink="false">http://timothytocci.com/?p=533</guid>

					<description><![CDATA[If you&#8217;re using Backbone to develop the front end in a local application you&#8217;ll have to override the Backbone.sync functionality to replace the REST functionality normally used by the library. Using Backbone in a local environment to store data, whether to store data in a file on the hard drive or using a local DB, [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you&#8217;re using <a href="http://backbonejs.org/">Backbone</a> to develop the front end in a local application you&#8217;ll have to override the <a href="http://backbonejs.org/#Sync">Backbone.sync</a> functionality to replace the REST functionality normally used by the library. Using <a href="http://backbonejs.org/">Backbone</a> in a local environment to store data, whether to store data in a file on the hard drive or using a local DB, is a bit different from its normal usage. The REST functionality has to be replaced with a file write or some other data storage code. The code below works for me:</p>
<pre class="brush: jscript; title: ; notranslate">
Backbone.sync = function(method, model, options) {
    if (method === &quot;create&quot;){
        let attrs = model.changed;
        if(Object.keys(attrs).length&gt;0){
            console.log(&quot;Update a record.&quot;);
        }else{
            console.log(&quot;Create a record.&quot;);
        }
    }
    if(method === &quot;read&quot;){
        if(model.length === 0){
            console.log(&quot;Pull the entire collection of records.&quot;);
        }else{
            console.log(&quot;Pull a single record.&quot;);
        }
    }
    if(method === &quot;delete&quot;){
        console.log(&quot;Delete this record and return nothing.&quot;);
    }
    if(method === &quot;update&quot;){
        console.log(&quot;This update functionality never runs.&quot;);
    }
};
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://timothytocci.com/2017/06/09/overriding-backbone-sync-for-local-use/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/63b055916f81adc2df2e711cf2edc6134f907138abd1799c75462f87f534cdf0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timothytocci</media:title>
		</media:content>
	</item>
		<item>
		<title>Internet Explorer 11 Context Menu Chooser Application Version 3</title>
		<link>https://timothytocci.com/2016/02/23/internet-explorer-11-context-menu-chooser-application-version-3/</link>
					<comments>https://timothytocci.com/2016/02/23/internet-explorer-11-context-menu-chooser-application-version-3/#comments</comments>
		
		<dc:creator><![CDATA[timothytocci]]></dc:creator>
		<pubDate>Tue, 23 Feb 2016 20:16:08 +0000</pubDate>
				<category><![CDATA[Analyze-It]]></category>
		<category><![CDATA[Browser Extension]]></category>
		<category><![CDATA[CEH]]></category>
		<category><![CDATA[Google-Music-Search]]></category>
		<category><![CDATA[Google-Open-Storage-Search]]></category>
		<category><![CDATA[Google-Translate-It]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Look-It-Up]]></category>
		<category><![CDATA[Plurk-It]]></category>
		<category><![CDATA[Share-It]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Wikipedia-Search]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[analyze-it]]></category>
		<category><![CDATA[browser-extension]]></category>
		<category><![CDATA[ceh]]></category>
		<category><![CDATA[google-music-search]]></category>
		<category><![CDATA[google-open-storage-search]]></category>
		<category><![CDATA[google-translate-it]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[internet-explorer]]></category>
		<category><![CDATA[look-it-up]]></category>
		<category><![CDATA[plurk-it]]></category>
		<category><![CDATA[share-it]]></category>
		<category><![CDATA[wikipedia-search]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[Windows 10]]></category>
		<category><![CDATA[Windows 10 Technical Preview]]></category>
		<category><![CDATA[Windows 7]]></category>
		<guid isPermaLink="false">http://timothytocci.com/?p=519</guid>

					<description><![CDATA[This is an application that allows you to pick and choose which of the many context menu add-ons you would like enabled in your browser. Internet Explorer does not support nested context menus so this I wrote this application to make it easy to enable and disable different menu items you may want to use [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><figure style="width: 786px" class="wp-caption aligncenter"><img class="" src="https://farm2.staticflickr.com/1715/24589771283_8a873432a2_o.png" alt="Internet Explorer 11 Context Menu Chooser Application Version 3" width="786" height="593" /><figcaption class="wp-caption-text">Internet Explorer 11 Context Menu Chooser Application Version 3</figcaption></figure></p>
<blockquote><p><em><span style="font-size:large;">This is an application that allows you to pick and choose which of the many context menu add-ons you would like enabled in your browser. Internet Explorer does not support nested context menus so this I wrote this application to make it easy to enable and disable different menu items you may want to use (instead of separate scripts). The context menu items are broke up into 8 groups: <a href="https://timothytocci.com/category/share-it/" target="_blank">Share-it</a>, <a href="https://timothytocci.com/category/analyze-it/" target="_blank">Analyze-it, Analyze-it-Scritch, Analyze-it-Viewdns</a>, <a href="https://timothytocci.com/category/plurk-it/" target="_blank">Plurk-it</a>, <a href="https://timothytocci.com/category/google-music-search/" target="_blank">Google-it</a>, <a href="https://timothytocci.com/category/look-it-up/" target="_blank">Look-it-up</a>, and <a href="https://timothytocci.com/category/internet-explorer/" target="_blank">IE-Utility</a>. The IE-Utility menu items are usually located in the Tools menu in the menubar on top which isn&#8217;t shown by default (just hit the Alt key and it will pop open temporarily).</span></em></p>
<p><em><span style="font-size:large;">There are also a couple of registry tweaks that I included in this application. One that adjusts the size of the thumbnails (on hover) of open applications on the taskbar. And another to give you more New Tab entries. There is also a reset button for the New Tab items you removed and want back. The New Tab functionality is generated automatically based on your browsing (you don&#8217;t get actual Speed Dial functionality &#8211; Internet Explorer chooses everything you see)</span></em></p></blockquote>
<p><span style="font-size:large;">There are a few changes in this new version that should be mentioned. The user interface has changed, the code was ported to be compiled, and there is now a version check that will help keep the application current.</span></p>
<p><span style="font-size:large;">In this version the user interface has been changed to be more convenient. I traded the scripted multi-screen interface for a more basic checkbox based dialog written using WinForms. Its just easier to use having everything in front of you on one dialog while making choices.</span></p>
<p><span style="font-size:large;">The code was ported from jscript/hta to nice modern Visual Basic 14. This should improve application start up time as well as use less memory while running. This compiled version of the application will perform better overall.</span></p>
<p><span style="font-size:large;">The scripting run time has a large overhead and is not maintained by Microsoft as other technologies are. For instance, when scripting a hypertext application the jscript has to target Internet Explorer 4/5 by default. By changing properties on the hta you can target IE8. I would have considered keeping the application scripted if Microsoft ported the hypertext application system to use the Edge or Internet Explorer 11 runtime.</span></p>
<p><figure style="width: 786px" class="wp-caption aligncenter"><img class="" src="https://farm2.staticflickr.com/1504/25098329982_635911c598_o.png" alt="Internet Explorer 11 Context Menu Chooser Application Version Check" width="786" height="593" /><figcaption class="wp-caption-text">Internet Explorer 11 Context Menu Chooser Application Version Check</figcaption></figure></p>
<p><span style="font-size:large;">There is now a version check enabled in the application. This application uses many external tools and features that are completely out of my control. As such, I&#8217;ve founds the application needs to be updated more often than other projects I&#8217;ve coded. In an effort to keep the application current I enabled a version check that checks weekly in the background that will somewhat automate the process of upgrading. By pressing the “Install new version” button the application will download the updated application in the background (no browser needed) to the Temp folder and start the installer.</span></p>
<p><span style="font-size:large;">The installer has also been tweaked to automatically start the old version uninstaller application (if it detects one) instead of the “do or die” message box that used to pop up. As there is a dependency on .NET 4.5, the installer will detect and start the web installer for the .NET framework as needed (this should only happen in Windows 7 without .NET 4.5).</span></p>
<p><span style="font-size:large;">Why write and maintain this application if Edge is the newest thing? Because desktop users will still prefer Internet Explorer 11 over Edge. Because I can&#8217;t see Microsoft having the only browser not running plug-ins. Because its still included in the operating system.</span></p>
<p><span style="font-size:large;">Where is it? Microsoft Internet Explorer 11 is located inside the Windows Accessories folder on the Windows 10 Start Menu. Or you could just click on the symbol in the upper left corner of my application.</span></p>
<p>&nbsp;</p>
<h4><a href="https://s3.amazonaws.com/timothytocci/apps/win/ie11-menus_v3_timothytocci.exe">Download Internet Explorer 11 Context Menu Chooser Application Version 3</a></h4>
]]></content:encoded>
					
					<wfw:commentRss>https://timothytocci.com/2016/02/23/internet-explorer-11-context-menu-chooser-application-version-3/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/63b055916f81adc2df2e711cf2edc6134f907138abd1799c75462f87f534cdf0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timothytocci</media:title>
		</media:content>

		<media:content url="https://farm2.staticflickr.com/1715/24589771283_8a873432a2_o.png" medium="image">
			<media:title type="html">Internet Explorer 11 Context Menu Chooser Application Version 3</media:title>
		</media:content>

		<media:content url="https://farm2.staticflickr.com/1504/25098329982_635911c598_o.png" medium="image">
			<media:title type="html">Internet Explorer 11 Context Menu Chooser Application Version Check</media:title>
		</media:content>
	</item>
	</channel>
</rss>
