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

<channel>
	<title>Samuel Haddad &#187; Programming</title>
	<atom:link href="http://samuelhaddad.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://samuelhaddad.com</link>
	<description></description>
	<lastBuildDate>Thu, 09 Sep 2010 06:17:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Find Dell Service Tag with C#.NET</title>
		<link>http://samuelhaddad.com/2009/08/15/find-dell-service-tag-with-c-net/</link>
		<comments>http://samuelhaddad.com/2009/08/15/find-dell-service-tag-with-c-net/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 03:13:04 +0000</pubDate>
		<dc:creator>Samuel Haddad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[Express Service Code]]></category>
		<category><![CDATA[Serial Number]]></category>
		<category><![CDATA[Service Tag]]></category>
		<category><![CDATA[Tech Support]]></category>
		<category><![CDATA[Win32 Bios]]></category>
		<category><![CDATA[Windows  Managment Instrumentation]]></category>
		<category><![CDATA[WMI]]></category>

		<guid isPermaLink="false">http://samuelhaddad.com/?p=418</guid>
		<description><![CDATA[In my line of work, I deal with a lot of Dell computers. I decided to write a little program that I could carry on my flash drive with me and all my other technical applications. What I like most about this application is the ability to quickly get to the Dell Warranty and driver [...]]]></description>
			<content:encoded><![CDATA[<p>In my line of work, I deal with a lot of Dell computers. I decided to write a little program that I could carry on my flash drive with me and all my other technical applications. What I like most about this application is the ability to quickly get to the Dell Warranty and driver information. I hope that someone else find this useful as well, if you do let me know.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-433" title="DellServiceTagFinder" src="http://samuelhaddad.com/wp-content/uploads/2009/08/DellServiceTagFinder.png" alt="DellServiceTagFinder" width="238" height="120" /></p>
<p style="text-align: center;">Download Dell Service Tag Finder: <a href="http://samuelhaddad.com/wp-content/uploads/2009/08/DellServiceTag.zip">Source</a> | <a href="http://samuelhaddad.com/wp-content/uploads/2009/08/DellServiceTag.exe">Executable</a></p>
<p style="TEXT-ALIGN: left">This is was possible using <a href="http://msdn.microsoft.com/en-us/library/aa394582(VS.85).aspx" target="_blank">Windows Management Instrumentation </a>and if you are interested in pulling other information from your computer I recommend you read up on it. For this example I used the <a href="http://msdn.microsoft.com/en-us/library/aa394077(VS.85).aspx" target="_blank">Win32_BIOS Class</a>, but you can find all the <a href="http://msdn.microsoft.com/en-us/library/aa394554(VS.85).aspx" target="_self">WMI Classes here</a>.</p>
<h2 style="text-align: left;">Preview of Source:</h2>
<pre class="brush: csharp;">
        String dellServiceTag;

        private void Form1_Load(object sender, EventArgs e)
        {
            //Load Service Tag
            ManagementClass wmi = new ManagementClass(&quot;Win32_Bios&quot;);
            foreach (ManagementObject bios in wmi.GetInstances())
            {
                dellServiceTag = bios.Properties[&quot;Serialnumber&quot;].Value.ToString().Trim();
            }
            Display.Text = dellServiceTag;
        }
</pre>
<h3>Notes:</h3>
<p>This application requires the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&amp;displaylang=en" target="_blank">.NET Framework </a>or you may receive application errors.</p>
<p>The service tag is pulled from the BIOS so if you ever had your motherboard replaced and the service tag was not reset it will be blank.</p>
]]></content:encoded>
			<wfw:commentRss>http://samuelhaddad.com/2009/08/15/find-dell-service-tag-with-c-net/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>VBscript Permission Denied 800A0046 Solution</title>
		<link>http://samuelhaddad.com/2009/06/26/vbscript-permission-denied-800a0046-solution/</link>
		<comments>http://samuelhaddad.com/2009/06/26/vbscript-permission-denied-800a0046-solution/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 18:58:10 +0000</pubDate>
		<dc:creator>Samuel Haddad</dc:creator>
				<category><![CDATA[Desktop Enginnering]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[800A0046]]></category>
		<category><![CDATA[Copy and Paste]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[File System Object]]></category>
		<category><![CDATA[FileSystemObject]]></category>
		<category><![CDATA[Permission]]></category>
		<category><![CDATA[Permission Denied]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://samuelhaddad.com/?p=412</guid>
		<description><![CDATA[I was helping a friend write some VBscript the other day. I was trying to write a simple copy function and I kept getting permission denied. However I was logged in locally as the administrator so that could not be it. My code looked something like: Sub CopyFile(source, destination) set filesys=CreateObject(&#34;Scripting.FileSystemObject&#34;) If filesys.FileExists(source) Then filesys.CopyFile [...]]]></description>
			<content:encoded><![CDATA[<p>I was helping a friend write some VBscript the other day. I was trying to write a simple copy function and I kept getting permission denied. However I was logged in locally as the administrator so that could not be it.</p>
<p>My code looked something like:</p>
<pre class="brush: vb;">
Sub CopyFile(source, destination)
	set filesys=CreateObject(&quot;Scripting.FileSystemObject&quot;)
	If filesys.FileExists(source) Then
	   filesys.CopyFile source, destination
	End If

End Sub
</pre>
<p><strong>The Solution is:</strong> add  &#8220;\&#8221; add the end of any of your path names like<br />
Dim destinationpath<br />
destinationpath = &#8220;C:\&#8221; &#038; myfolder &#038; &#8220;\&#8221;</p>
<p>Hope this helps someone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://samuelhaddad.com/2009/06/26/vbscript-permission-denied-800a0046-solution/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating a Single Instance C# Application</title>
		<link>http://samuelhaddad.com/2009/05/19/creating-a-single-instance-c-application/</link>
		<comments>http://samuelhaddad.com/2009/05/19/creating-a-single-instance-c-application/#comments</comments>
		<pubDate>Wed, 20 May 2009 00:51:13 +0000</pubDate>
		<dc:creator>Samuel Haddad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Mutex]]></category>
		<category><![CDATA[Single Instance]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://samuelhaddad.com/?p=385</guid>
		<description><![CDATA[This is something I find myself looking up alot so I decided to put it into a post for easy access, and for anyone else who might be looking for a solution. using System.Threading;     static class Program     {         /// &#60;summary&#62;         /// The main entry point for the application.         /// &#60;/summary&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>This is something I find myself looking up alot so I decided to put it into a post for easy access, and for anyone else who might be looking for a solution. </p>
<pre class="brush: csharp;">using System.Threading;</pre>
<pre class="brush: csharp;">
    static class Program
    {
        /// &lt;summary&gt;
        /// The main entry point for the application.
        /// &lt;/summary&gt;
        [STAThread]
        static void Main()
        { 

            bool createdNew = true;
            using (Mutex mutex = new Mutex(true, &quot;SignleInstance&quot;, out createdNew))
            {
                if (createdNew)
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.Run(new Form1());
                }
            }

        }
    }
</pre>
<p><a href='http://samuelhaddad.com/wp-content/uploads/2009/05/singleinstance.zip'>Download Single Instance Application Source Code</a></p>
<p>I still don&#8217;t get why in Visual Studio in VB.NET one could click make single instance application, but that same feature doesn&#8217;t exist in C#? Don&#8217;t all .NET languages just get compiled to the CIL in the end?</p>
]]></content:encoded>
			<wfw:commentRss>http://samuelhaddad.com/2009/05/19/creating-a-single-instance-c-application/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom Free Silent LogMeIn Installer.</title>
		<link>http://samuelhaddad.com/2009/05/17/custom-free-silent-logmein-installer/</link>
		<comments>http://samuelhaddad.com/2009/05/17/custom-free-silent-logmein-installer/#comments</comments>
		<pubDate>Mon, 18 May 2009 00:46:20 +0000</pubDate>
		<dc:creator>Samuel Haddad</dc:creator>
				<category><![CDATA[Desktop Enginnering]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech Support]]></category>
		<category><![CDATA[Custom LogMein Installer]]></category>
		<category><![CDATA[LogMeIn]]></category>
		<category><![CDATA[LogMeIn Silent Installer]]></category>
		<category><![CDATA[Silent Installer]]></category>
		<category><![CDATA[Single Click LogMeIn Installer]]></category>

		<guid isPermaLink="false">http://samuelhaddad.com/?p=149</guid>
		<description><![CDATA[So there are already a few guides out there on how to make a Silent(In the sense that it don&#8217;t ask you for your username and password) LogMeIn installer. I am going to show you the way I do it with step by step instructions so that anyone can follow.  This tutorial will be broken into two [...]]]></description>
			<content:encoded><![CDATA[<p>So there are already a few guides out there on how to make a Silent(In the sense that it don&#8217;t ask you for your username and password) LogMeIn installer. I am going to show you the way I do it with step by step instructions so that anyone can follow.  This tutorial will be broken into two parts. Part 1 is for customizing the LogMeIn installer. The second part is for making your own.<span style="color: #ff0000;"> Disclaimer this tutorial is for educational purposes only.</span></p>
<h1>Part 1 - Customizing the Installer:</h1>
<p><span style="color: #ff0000;">Last updatede on September 17, 2009 to reflect the newest version of LogMeIn version 4.0.0.966 (Sep 5 2009)</span></p>
<p>Get the tools that you will need to complete this job:</p>
<p><a href="http://www.technipages.com/wp-content/uploads/2007/11/orca.Msi" target="_self">Download Orca</a> &#8211; Orca is a MSI editor. It allows you to change the title and text of any MSI installer.<br />
<a href="http://www.logmein.com">LogMeIn.com</a> &#8211; Log into your LogMeIn account and download the installer. </p>
<p>Download me in installer to a folder on your desktop. Make a copy and name it LogMeInClean.msi incase you corrupt your installer and have to restart.</p>
<p><strong>Step 1: Edit the OnInstallExecuteSequence Table:</strong></p>
<p>Find the installer you just downloaded and right click on it and select <strong>&#8220;Edit with Orca&#8221;</strong></p>
<p>Find <strong>InstallExecuteSequence</strong> under the table list on the left hand side, then do the following: </p>
<ol>
<li>Select <strong>GetDeployInfo</strong> under the action list. <br />
Change: <strong>UILevel=2 AND UPGRADEPRODUCT&lt;&gt;1 AND InstallMode&lt;&gt;&#8221;Remove&#8221;</strong><br />
into: <strong>UPGRADEPRODUCT&lt;&gt;1 AND InstallMode&lt;&gt;&#8221;Remove&#8221;         </p>
<p></strong></li>
<li>Right click on the right panel and select &#8220;Add Row&#8221;:<br />
ACTION: <strong>GetLMIRegistrationCookie<br />
</strong>CONDITION: <strong>NOT Installed</strong><br />
SEQUENCE: <strong>3710         </p>
<p></strong></li>
<li>Right click on the right panel and select &#8220;Add Row&#8221;:<br />
ACTION: <strong>LMIGetLicense </strong><br />
CONDITION: <strong>NOT Installed</strong><br />
SEQUENCE: <strong>3730         </p>
<p></strong></li>
<li>Select <strong>CreateUser </strong>under the action list. <br />
Change: <strong>CANCREATEUSER AND PASSWORDSOK=&#8221;true&#8221; AND VersionNT AND REMOVE&lt;&gt;&#8221;ALL&#8221;<br />
</strong>into: <strong>VersionNT AND REMOVE&lt;&gt;&#8221;ALL&#8221;         </p>
<p></strong></li>
<li>Select <strong>CreateUserSetProperty</strong> under the action list. <br />
Change: <strong>CANCREATEUSER AND PASSWORDSOK=&#8221;true&#8221; AND VersionNT AND REMOVE&lt;&gt;&#8221;ALL&#8221;<br />
</strong>into: <strong>VersionNT AND REMOVE&lt;&gt;&#8221;ALL&#8221;         </p>
<p></strong></li>
<li>Right click on <strong>SetX64Path </strong>and select &#8220;Drop Row&#8221;<br />
Right click on <strong>SetX86Path </strong>and select &#8220;Drop Row&#8221;</li>
</ol>
<p>Find <strong>Property </strong>under the table list on the left hand side, then do the following: under the table list on the left hand side, then do the following: </p>
<ol>
<li>Select <strong>LICENSETYPE</strong> under the action list.&#8221;<br />
Change: <strong>5<br />
</strong>into: <strong>0      </strong><strong> </strong></li>
<li><strong> </strong>Right click on <strong>DEPLOYID </strong>and select &#8220;Drop Row&#8221;<strong><span style="color: #ff0000;"> </span></strong><span style="color: #ff0000;">Important note, since installers can be reversed make a LogMeIn account which only has the ability to add computers, then move them out of that user&#8217;s name.  Once they are installed. Use this account for the following steps.  To make an account login to your LogMeIn account and click <strong>users</strong> on the left hand side. Then add a new <strong>Administrator</strong>, and give that account the ability to<strong> Deploy Computers. </strong>When a new computer is added you will want to edit that user and remove rights to that computer if you choose to do it this way.</span><br />
 </li>
<li>Right click on the right panel and select &#8220;Add Row&#8221;:<br />
property: <strong>USEREMAIL</strong><br />
value: Y<strong>our account&#8217;s email address  </p>
<p></strong></li>
<li><span style="color: #ff0000;"><span style="color: #000000;">Right click o n the right panel and select &#8220;Add Row&#8221;:<br />
property:<strong>USERWEBPASSWORD<br />
</strong>value: <strong>Your account&#8217;s web login password</strong></span></span><span style="color: #ff0000;"><strong>     </p>
<p></strong></span></li>
<li>Right click on the right panel and select &#8220;Add Row&#8221;:<br />
property<strong>USERPASSWORD</strong><br />
value: P<strong>assword if no windows password present         </p>
<p></strong></li>
<li>Right click on the right panel and select &#8220;Add Row&#8221;:<br />
property: <strong>USERVERIFYPWD<br />
</strong>value: P<strong>assword if no windows password present<span style="color: #ff0000;"> If you need to configure LogMeIn for a proxy look for the proxy settings in the action list.       </p>
<p> </p>
<p></span></strong></li>
</ol>
<p><span style="color: #000000;">Then in Orca click<strong> File </strong>then <strong>Save. </strong>Make sure you do save and not save as, this is because Orca only saves the different changes, if you notice you have a tiny file like .5mb then you did it wrong.</span> </p>
<p><strong> </strong> </p>
<h1>Part 2 &#8211; Making the Installer:</h1>
<p>Get the tools that you will need to complete this job:</p>
<p><a href="http://www.jrsoftware.org/isinfo.php">Download Inno Setup</a> &#8211; <span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 13px verdana; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: #000000; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0">Inno Setup is a free installer for Windows programs.</span> </p>
<p><a href="http://samuelhaddad.com/wp-content/uploads/2009/05/setupkit.zip">Download the Setup Kit</a> &#8211; A simple kit I have put together for you to create a custom installer. Change the images to meet your needs.<br />
That is it, make sure you leave your comments.</p>
<p> </p>
<p>Most of this information came from <a title="www.msfn.org" href="http://www.msfn.org/board/index.php?showtopic=101432&amp;st=100">http://www.msfn.org/</a> by writting this post I hope to save you from digging through 8 pages of post, and give you the most relavent information for the newest version of LogMeIn.</p>
<p><strong> <br />
Edit:</strong> 08/02/09:<br />
Thank you Dale for pointing out a spelling mistake and an error.</p>
]]></content:encoded>
			<wfw:commentRss>http://samuelhaddad.com/2009/05/17/custom-free-silent-logmein-installer/feed/</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
		<item>
		<title>Visual Studio Tips and Tricks</title>
		<link>http://samuelhaddad.com/2009/05/06/visual-studio-tips-and-tricks/</link>
		<comments>http://samuelhaddad.com/2009/05/06/visual-studio-tips-and-tricks/#comments</comments>
		<pubDate>Thu, 07 May 2009 02:30:55 +0000</pubDate>
		<dc:creator>Samuel Haddad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://samuelhaddad.com/?p=311</guid>
		<description><![CDATA[Alternate Case/Format selection: Have you ever been asked to update some code from a long time ago only to find that almost every tag is in capital letters?  AGHH! &#60;HTML&#62; &#60;HEAD&#62; &#60;TITLE&#62;My Really Old Site&#60;/TITLE&#62; &#60;/HEAD&#62; &#60;BODY&#62; &#60;P&#62; Lots of body test &#60;/P&#62; &#60;P&#62; Lots of body test &#60;/P&#62; &#60;P&#62; Lots of body test &#60;/P&#62; &#60;IMG [...]]]></description>
			<content:encoded><![CDATA[<h3>Alternate Case/Format selection:</h3>
<p>Have you ever been asked to update some code from a long time ago only to find that almost every tag is in capital letters?  AGHH!</p>
<pre class="brush: xml;">
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;My Really Old Site&lt;/TITLE&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;

&lt;P&gt; Lots of body test &lt;/P&gt;
&lt;P&gt; Lots of body test &lt;/P&gt;
&lt;P&gt; Lots of body test &lt;/P&gt;

&lt;IMG SRC=&quot;mypic.jpg&quot; width=351 height=113&gt;

&lt;/BODY&gt;
&lt;/HTML&gt;
</pre>
<p>Highlight all that code and press CTRL + K then CTRL + F and you will format all the code. It would then look something like this</p>
<pre class="brush: xml;">

&lt;html&gt;
&lt;head&gt;
&lt;title&gt;My Really Old Site&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;
Lots of body test
&lt;/p&gt;
&lt;p&gt;
Lots of body test
&lt;/p&gt;
&lt;p&gt;
Lots of body test
&lt;/p&gt;
&lt;img src=&quot;mypic.jpg&quot; width=&quot;351&quot; height=&quot;113&quot;&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Granted your code may still be far from perfect, but it is definitely a huge help.</p>
<h2>Key Launcher (Like Alt + Tab on Windows)</h2>
<p>Are you someone that lives by keyboard shortcuts? I know I am.  Are you familar with Windows Alt + Tab keyboard shortcut and toggling through all active programs? Well a similar feature exists within Visual Studio press <strong>Ctrl + Tab </strong>and toggle through your active Windows and Files.</p>
<p><img class="alignnone size-full wp-image-331" title="Visual Studio Ctrl + Tab" src="http://samuelhaddad.com/wp-content/uploads/2009/05/controltab.png" alt="Visual Studio Ctrl + Tab" width="600" height="326" /></p>
<h2>Intellisense</h2>
<p><strong>Control + Spacebar </strong>will bring up intellisense if you are in code view. Great if you click out by accident or you just want to see what is available in the scope of the code.</p>
<p><img class="alignnone size-full wp-image-332" title="Visual Studio Intellisense" src="http://samuelhaddad.com/wp-content/uploads/2009/05/intellisense.png" alt="Visual Studio Intellisense" width="334" height="191" /></p>
<h2>Break Points</h2>
<p>Have a bunch of break points scattered over a couple of files in a solution. Just want to delete them all and start fresh. <strong>Ctrl + Shift + F9 </strong>will delete all current break points in a solution. Don&#8217;t worry Visual Studio will prompt you with a confirmation first.</p>
<h2>Get Visual Studio Professional for free!</h2>
<p>Well maybe. If you are a student like myself you can head over to <a href="https://www.dreamspark.com/" target="_blank">https://www.dreamspark.com/</a>which is run by Microsoft. They offer full versions of some of the newest Microsoft products, like Visual Studio. Why? Because they know we are the future and they think we are an investment. Take them up on the opportunity and get ahead of the competition.</p>
<h2>Shortcut key posters:</h2>
<p>Microsoft Visual Studio has a bunch of keyboard combinations that can be very helpful, to get a more complete list check out some of the resources Microsoft offers:</p>
<h2><img class="alignnone size-full wp-image-336" title="Visual Studio Key Reference Posters" src="http://samuelhaddad.com/wp-content/uploads/2009/05/posters.png" alt="Visual Studio Key Reference Posters" width="524" height="282" /></h2>
<p><a href="http://www.microsoft.com/downloads/details.aspx?familyid=E5F902A8-5BB5-4CC6-907E-472809749973&amp;displaylang=en" target="_blank">Visual C# 2008 Keybinding Reference Poster</a></p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?familyid=255b8cf1-f6bd-4b55-bb42-dd1a69315833&amp;displaylang=en" target="_blank">Visual Basic 2008 Keybinding Reference Poster</a></p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4411bbfc-0e3c-42b3-bd05-af1d292c986f&amp;displaylang=en" target="_blank">Visual C++ 2008 Keybinding Reference Poster</a></p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?familyid=C15D210D-A926-46A8-A586-31F8A2E576FE&amp;displaylang=en" target="_blank">Visual C# 2005 Keyboard Shortcut Reference Poster</a></p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6bb41456-9378-4746-b502-b4c5f7182203&amp;DisplayLang=en" target="_blank">Visual Basic 2005 Keyboard Shortcut Reference Poster</a></p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=bccf84f4-4136-48b2-b4ec-83eaa484da20&amp;DisplayLang=en" target="_blank">Visual C++ 2005 Keyboard Shortcut Reference Poster</a></p>
]]></content:encoded>
			<wfw:commentRss>http://samuelhaddad.com/2009/05/06/visual-studio-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Silly Error Message</title>
		<link>http://samuelhaddad.com/2009/04/19/silly-error-message/</link>
		<comments>http://samuelhaddad.com/2009/04/19/silly-error-message/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 01:44:32 +0000</pubDate>
		<dc:creator>Samuel Haddad</dc:creator>
				<category><![CDATA[Computer Jokes]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Error Message]]></category>

		<guid isPermaLink="false">http://samuelhaddad.com/?p=281</guid>
		<description><![CDATA[  So I am just trying to finish up my new program Twitter Talk when I am running a test and I get the following error message. Should we start hiring error message checkers? Any ways if you get this  Win32Exception  was Unhandled &#8220;The Operation Completed Successfully&#8221; error message my workaround was to uncheck the check box [...]]]></description>
			<content:encoded><![CDATA[<p> </p>
<div id="attachment_282" class="wp-caption alignnone" style="width: 469px"><img class="size-full wp-image-282" title="Silly Error Message" src="http://samuelhaddad.com/wp-content/uploads/2009/04/sillyerror.jpg" alt="The Operation Completed Successfully Error Message" width="459" height="247" /><p class="wp-caption-text">The Operation Completed Successfully Error Message</p></div>
<p>So I am just trying to finish up my new program Twitter Talk when I am running a test and I get the following error message.</p>
<p>Should we start hiring error message checkers?</p>
<p>Any ways if you get this  Win32Exception  was Unhandled &#8220;The Operation Completed Successfully&#8221; error message my workaround was to uncheck the check box in the project properties that says: &#8220;Enable Visual Studio hosting process&#8221;. In the menu: Project -&gt; Project Properties&#8230; -&gt; Debug -&gt; Enable the Visual Studio hosting process. </p>
<p>Hope this helps someone this solution came from: <a href="http://www.codeproject.com/KB/cs/globalhook.aspx?msg=2427545#xx2427545xx">http://www.codeproject.com/KB/cs/globalhook.aspx?msg=2427545#xx2427545xx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://samuelhaddad.com/2009/04/19/silly-error-message/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Overwriting an Excel file destination using SSIS</title>
		<link>http://samuelhaddad.com/2009/03/31/overwriting-an-excel-file-destination-using-ssis/</link>
		<comments>http://samuelhaddad.com/2009/03/31/overwriting-an-excel-file-destination-using-ssis/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 23:57:57 +0000</pubDate>
		<dc:creator>Samuel Haddad</dc:creator>
				<category><![CDATA[Desktop Enginnering]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Excel Destination]]></category>
		<category><![CDATA[Overwrite Excel File]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server Integration Service]]></category>

		<guid isPermaLink="false">http://samuelhaddad.com/?p=256</guid>
		<description><![CDATA[This was a problem I racked my brains over for a while when I first started using SSIS. I found a few possible including using a File System task to copy a &#8220;Template&#8221; Excel file over the existing on, or generating unique files by appending the date.  I simply wanted to overwrite the existing data [...]]]></description>
			<content:encoded><![CDATA[<p>This was a problem I racked my brains over for a while when I first started using SSIS. I found a few possible including using a File System task to copy a &#8220;Template&#8221; Excel file over the existing on, or generating unique files by appending the date.  I simply wanted to overwrite the existing data just like the <strong>Flat File Destination </strong>gives you that option.</p>
<p>My work around was as flows:</p>
<p>Create the Data flow the way you normally would, then go to the <strong>Control View </strong> Then add two <strong>Execute SQL Tasks </strong> before your data flow is called so it looks like this</p>
<div id="attachment_257" class="wp-caption alignnone" style="width: 170px"><img class="size-medium wp-image-257" title="Step 1: Add Execute SQL Task 1 to Control Flow" src="http://samuelhaddad.com/wp-content/uploads/2009/03/step1controlflow.png" alt="Step 1: Add Execute SQL Task 1 to Control Flow" width="160" height="257" /><p class="wp-caption-text">Step 1: Add Execute SQL Task 1 to Control Flow</p></div>
<p>Set both <strong>Execute SQL Tasks </strong>to use the Excel file</p>
<div id="attachment_258" class="wp-caption alignnone" style="width: 397px"><img class="size-full wp-image-258" title="Step 2: Set Connection Manager" src="http://samuelhaddad.com/wp-content/uploads/2009/03/step2connectionmanager.png" alt="Step 2: Set Connection Manager" width="387" height="120" /><p class="wp-caption-text">Step 2: Set Connection Manager</p></div>
<p>Set your first <strong>Execute SQL Task&#8217;s </strong>SQL Command drop your table which is also known as the sheet name of your Excel file.</p>
<div id="attachment_259" class="wp-caption alignnone" style="width: 345px"><img class="size-full wp-image-259" title="Step 3: Drop Table" src="http://samuelhaddad.com/wp-content/uploads/2009/03/step3droptable.png" alt="Step 3: Drop Table" width="335" height="335" /><p class="wp-caption-text">Step 3: Drop Table</p></div>
<p>Repeat step 3 on the second <strong>Execute SQL Command </strong>this time create your tables.</p>
<p>That&#8217;s it. Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://samuelhaddad.com/2009/03/31/overwriting-an-excel-file-destination-using-ssis/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>C# .NET and LyricWiki to lookup lyrics</title>
		<link>http://samuelhaddad.com/2009/03/22/c-net-and-lyricwiki-to-lookup-lyrics/</link>
		<comments>http://samuelhaddad.com/2009/03/22/c-net-and-lyricwiki-to-lookup-lyrics/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 03:03:32 +0000</pubDate>
		<dc:creator>Samuel Haddad</dc:creator>
				<category><![CDATA[Desktop Enginnering]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[LyricsWiki]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://samuelhaddad.com/?p=204</guid>
		<description><![CDATA[Music is everywhere with today&#8217;s high speed internet is most home it is no wonder that music is even moving to the World Wide Web. Many radio stations allow you to stream their stations over the internet. Many websites have been developed around music, like www.jango.com, www.pandora.com, and www.last.fm. I recently released my second version [...]]]></description>
			<content:encoded><![CDATA[<p>Music is everywhere with today&#8217;s high speed internet is most home it is no wonder that music is even moving to the World Wide Web. Many radio stations allow you to stream their stations over the internet. Many websites have been developed around music, like <a href="http://www.jango.com/">www.jango.com</a>, <a href="http://www.pandora.com/">www.pandora.com</a>, and <a href="http://www.last.fm/">www.last.fm</a>. I recently released my second version of <a href="../../../../../software-projects/jango-desktop/">Jango Desktop</a> and one of the features I implemented was the ability to look up lyrics. Before I started I was thinking about all the ways I could parse the lyrics out of an existing lyric&#8217;s websites database. During my searching I stumbled upon <a href="http://lyricwiki.org/">http://lyricwiki.org/</a>. Here is a small description of LyricWiki from the website:</p>
<p>LyricWiki is a free site which is a source where anyone can go to get reliable lyrics for any song, from any artist, without being hammered by invasive ads.</p>
<p>At this point you are probably thinking to yourself the same thing I did &#8220;Great, but where do I start?&#8221; So today I am writing a step by step tutorial on how to use Lyric wiki in your .NET program.</p>
<h2>Creating a simple lyric demo program:</h2>
<div id="attachment_249" class="wp-caption alignnone" style="width: 666px"><img class="size-full wp-image-249" title="Step 1 Create the Form" src="http://samuelhaddad.com/wp-content/uploads/2009/03/step11.jpg" alt="Step 1 Create the Form" width="656" height="370" /><p class="wp-caption-text">Step 1: Create the Form</p></div>
<p>Open visual studio and setup your form to look similar to mine.</p>
<h3>Adding the web service:</h3>
<p>Because LyricWiki offers a web service, you will want to add it to your program as a web reference.   Right click on your solution and select add a web reference, or in .net 3.5 add a service reference -&gt; then go to advance and add a web reference. The service&#8217;s URL is <a href="http://lyricwiki.org/server.php?wsdl">http://lyricwiki.org/server.php?wsdl</a> you will want to add it like below if you press go you should see the available methods.</p>
<div id="attachment_251" class="wp-caption alignnone" style="width: 835px"><img class="size-full wp-image-251" title="Adding a Web Reference" src="http://samuelhaddad.com/wp-content/uploads/2009/03/step21.jpg" alt="Adding a Web Reference" width="825" height="572" /><p class="wp-caption-text">Adding a Web Reference</p></div>
<h3>Writing the code:</h3>
<p>Double click on your button on the form and let&#8217;s right some code to handle the lookup.</p>
<p>Add this to the top of your code:</p>
<pre class="brush: csharp;">

using LyricsLookup.org.lyricwiki;
</pre>
<p>Then add this to the button clicked method:</p>
<pre class="brush: csharp;">

private void LyricsButton_Click(object sender, EventArgs e)

{

LyricWiki wiki = new LyricWiki();

LyricsResult result;

string artist = artistTextBox.Text;

string song =   SongTextBox.Text;

if(wiki.checkSongExists(artist,song))

{

result = wiki.getSong(artist, song);

Encoding iso8859 = Encoding.GetEncoding(&quot;ISO-8859-1&quot;);

LyricsRichTextBox.Text = Encoding.UTF8.GetString(iso8859.GetBytes(result.lyrics));

}else{

StatusLabel.Text = &quot;Lyrics not found in database&quot;;

}

}
</pre>
<p>Then run and test.</p>
<p><a href="http://samuelhaddad.com/wp-content/uploads/2009/03/LyricsLookup.zip">Download the full solution of LyricsLookup</a></p>
]]></content:encoded>
			<wfw:commentRss>http://samuelhaddad.com/2009/03/22/c-net-and-lyricwiki-to-lookup-lyrics/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
