<?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/tag/programming/feed/" rel="self" type="application/rss+xml" /><link>http://samuelhaddad.com</link> <description></description> <lastBuildDate>Thu, 03 Nov 2011 16:32:38 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <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. Download Single Instance Application Source Code I still don&#8217;t get why in Visual Studio in VB.NET one could click make single instance application, [...]]]></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; title: ; notranslate">using System.Threading;</pre><pre class="brush: csharp; title: ; notranslate">
    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>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! 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 [...]]]></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; title: ; notranslate">
&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; title: ; notranslate">
&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> </channel> </rss>
