<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7789702040925978341</id><updated>2024-08-30T12:08:42.426-07:00</updated><category term="Windows"/><category term="Apache"/><category term="C#"/><category term="CVS"/><category term="Coding"/><category term="Excel"/><category term="Excel 2007"/><category term="Forms"/><category term="Java"/><category term="Office 2007"/><category term="Open in a new window"/><category term="Tomcat 7"/><category term="TortoiseCVS"/><category term="Visual Studio"/><category term="Web Services"/><category term="Windows 7"/><category term="edit comment"/><title type='text'>Code Until</title><subtitle type='html'>Because it&#39;s necessary to code until it&#39;s done</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codeuntil.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7789702040925978341/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://codeuntil.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>FvZ</name><uri>http://www.blogger.com/profile/11521279197143776193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7789702040925978341.post-2449942356175329442</id><published>2013-01-07T06:26:00.002-08:00</published><updated>2013-04-22T06:58:24.259-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CVS"/><category scheme="http://www.blogger.com/atom/ns#" term="edit comment"/><category scheme="http://www.blogger.com/atom/ns#" term="TortoiseCVS"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>How to edit commit comments in Tortoise CVS</title><content type='html'>&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Tahoma, Verdana; font-size: 12px; line-height: 20px;&quot;&gt;Have you forgotten to add some important information while committing a file and wanted to edit them later? Of course you can do that by command line, but I really hate to access CVS by command line on windows, mostly because the bash is horrible.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Tahoma, Verdana; font-size: 12px; line-height: 20px;&quot;&gt;&lt;span style=&quot;color: #eeeeee;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Tahoma, Verdana; font-size: 12px; line-height: 20px;&quot;&gt;&lt;span style=&quot;color: #eeeeee;&quot;&gt;Here is what you can do to change the comments after commit in Tortoise CVS:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Tahoma, Verdana; font-size: 12px; line-height: 20px;&quot;&gt;&lt;span style=&quot;color: #eeeeee;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #eeeeee; font-family: Arial, Tahoma, Verdana;&quot;&gt;Right click on on your file and select the History option.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSuZZUWNVLO3T4EE4PYp80S4F21C5MEst68prYiRTzSkhvCXmJm_We6JU8Cl5zjr2imIJjWPz0C9JLOYOLNp5Z74OX5QVcpxj_4P5XhtR2HqakftiztaHGvylUWxnzBg2Udpfge3r__58/s1600/select+history+tortoise.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;78&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSuZZUWNVLO3T4EE4PYp80S4F21C5MEst68prYiRTzSkhvCXmJm_We6JU8Cl5zjr2imIJjWPz0C9JLOYOLNp5Z74OX5QVcpxj_4P5XhtR2HqakftiztaHGvylUWxnzBg2Udpfge3r__58/s400/select+history+tortoise.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #eeeeee; font-family: Arial, Tahoma, Verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #eeeeee; font-family: Arial, Tahoma, Verdana;&quot;&gt;Select the version you want to change the comments for.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;li&gt;&lt;span style=&quot;color: #eeeeee; font-family: Arial, Tahoma, Verdana;&quot;&gt;Edit the comment as you wish, then select Apply or OK.&lt;/span&gt;&lt;/li&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGP59DXi5yBOpTUDTlJ9om7cODSg-7FzeAo65cNGbgiMLuCxVN37mKkcpMknTIDYe-t_NV514OETO2x0lrEe3VJjYLQy7d1A2ArTQfZtSgoHS7lGCwzQXzOxkbWN7r6yfKiSJpxWXv898/s1600/edit+comment+tortoise.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGP59DXi5yBOpTUDTlJ9om7cODSg-7FzeAo65cNGbgiMLuCxVN37mKkcpMknTIDYe-t_NV514OETO2x0lrEe3VJjYLQy7d1A2ArTQfZtSgoHS7lGCwzQXzOxkbWN7r6yfKiSJpxWXv898/s400/edit+comment+tortoise.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #eeeeee; font-family: Arial, Tahoma, Verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #eeeeee; font-family: Arial, Tahoma, Verdana;&quot;&gt;Shazam, you just edited your previous commit comment.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;

</content><link rel='replies' type='application/atom+xml' href='http://codeuntil.blogspot.com/feeds/2449942356175329442/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://codeuntil.blogspot.com/2013/01/how-to-edit-commit-comments-in-tortoise.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7789702040925978341/posts/default/2449942356175329442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7789702040925978341/posts/default/2449942356175329442'/><link rel='alternate' type='text/html' href='http://codeuntil.blogspot.com/2013/01/how-to-edit-commit-comments-in-tortoise.html' title='How to edit commit comments in Tortoise CVS'/><author><name>FvZ</name><uri>http://www.blogger.com/profile/11521279197143776193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSuZZUWNVLO3T4EE4PYp80S4F21C5MEst68prYiRTzSkhvCXmJm_We6JU8Cl5zjr2imIJjWPz0C9JLOYOLNp5Z74OX5QVcpxj_4P5XhtR2HqakftiztaHGvylUWxnzBg2Udpfge3r__58/s72-c/select+history+tortoise.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7789702040925978341.post-8154090792487266100</id><published>2012-08-05T17:58:00.001-07:00</published><updated>2012-08-05T17:59:51.322-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Tomcat 7"/><category scheme="http://www.blogger.com/atom/ns#" term="Web Services"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 7"/><title type='text'>How to install Tomcat 7 on your Windows 7</title><content type='html'>Hi folks, today I will teach you how to install Apache Tomcat 7 on your Windows 7 machine, but first a little introduction about Tomcat.&lt;br /&gt;
&lt;br /&gt;
Tomcat it&#39;s a Java Servlet container, which means that you it to run you that web services that you write in Java. I will teach you how to create a web service in a future post but for now, let&#39;s install Tomcat.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
First you need to download and install the most recent JDK (Java Development Kit ) &lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/index.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&amp;nbsp;. The&amp;nbsp;installation is very simple, just press next until it&#39;s done.&lt;br /&gt;
&lt;br /&gt;
Then you need to download Apache Tomcat &lt;a href=&quot;http://tomcat.apache.org/download-70.cgi&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. You need to select under Core the zip suitable for the version of Windows installed on your machine (32 bit or 64 bit).&lt;br /&gt;
&lt;br /&gt;
After you download you need to extract &amp;nbsp;the zip for a location on your computer, I choose &quot;C:\apache-tomcat-7.0.29&quot;. Ok, now if you go under \bin you will find two batch files, startup.bat and shutdown.bat, but if you give a try to those scripts you will see that they will not work right of the box.&lt;br /&gt;
&lt;br /&gt;
For Tomcat work you need to set some&amp;nbsp;environment&amp;nbsp;variables in Windows, so let&#39;s do it.&lt;br /&gt;
&lt;br /&gt;
First go to Control Panel &amp;gt; System &amp;gt; Advanced System Settings under the tab Advanced (true windows advanced stuff bro) and click the button Environment Variables.&lt;br /&gt;
&lt;br /&gt;
On the System Variables box you need to create two entries, the first with the name CATALINA_HOME and as value you need to put the path to where you extracted Tomcat ( in my case &quot;C:\apache-tomcat-7.0.29&quot;). The second one is called JAVA_HOME and you should set as value the path to your JDK&amp;nbsp;installation&amp;nbsp;(mine is &quot;C:\Program Files\Java\jdk1.7.0_05&quot;).&lt;br /&gt;
&lt;br /&gt;
You need then to edit a variable called Path, find it, and click edit. On the value field you will see a lot of stuff, go to the end of the field and insert this info&amp;nbsp;;%CATALINA_HOME%\bin;%JAVA_HOME%\bin&lt;br /&gt;
&lt;br /&gt;
Hit OK a couple of time and restart your computer, when it&#39;s back online go for that startup.bat and give hit a double-kick and you will see the server starting. Go to a browser and access http://localhost:8080 to see if tomcat is running.&lt;br /&gt;
&lt;br /&gt;
That&#39;s it my friends, easy as you can see.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeuntil.blogspot.com/feeds/8154090792487266100/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://codeuntil.blogspot.com/2012/08/how-to-install-tomcat-7-on-your-windows.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7789702040925978341/posts/default/8154090792487266100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7789702040925978341/posts/default/8154090792487266100'/><link rel='alternate' type='text/html' href='http://codeuntil.blogspot.com/2012/08/how-to-install-tomcat-7-on-your-windows.html' title='How to install Tomcat 7 on your Windows 7'/><author><name>FvZ</name><uri>http://www.blogger.com/profile/11521279197143776193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7789702040925978341.post-4882527926842557768</id><published>2012-07-03T05:53:00.002-07:00</published><updated>2012-07-03T05:57:26.934-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel 2007"/><category scheme="http://www.blogger.com/atom/ns#" term="Office 2007"/><category scheme="http://www.blogger.com/atom/ns#" term="Open in a new window"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>How to open excel 2007 documents in new a window</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
Just I quick post to solve a problem that I found some days ago.&lt;br /&gt;
&lt;br /&gt;
If you use Office 2007, you know how problematic is the way that Excel open new documents. The documents are open inside the current instance of Excel, but this is problem if you want to show 2 spreadsheets side-by-side or show then along multiple monitors.&lt;br /&gt;
&lt;br /&gt;
To solve this you need to change some register entrys so every time you open a new spreadsheet it should open on a new Excel window.&lt;br /&gt;
&lt;br /&gt;
I made a little .reg file to make this task easy. So what you need to do is just download &lt;a href=&quot;https://dl.dropbox.com/u/6042302/Code%20Until/Add%20Open%20In%20New%20Excel%20Instance%20and%20Make%20Default.reg&quot;&gt;this file&lt;/a&gt; and execute it.&lt;br /&gt;
&lt;br /&gt;
If you are not sure about how safe this is, well just open the .reg file with notepad and look what it do. Just Excel related registry entries are modified.&lt;br /&gt;
&lt;br /&gt;
That&#39;s it. Tell me if it helps you, and remember to code (calculate in this case) until it&#39;s done.</content><link rel='replies' type='application/atom+xml' href='http://codeuntil.blogspot.com/feeds/4882527926842557768/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://codeuntil.blogspot.com/2012/07/how-to-open-excel-2007-documents-in-new.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7789702040925978341/posts/default/4882527926842557768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7789702040925978341/posts/default/4882527926842557768'/><link rel='alternate' type='text/html' href='http://codeuntil.blogspot.com/2012/07/how-to-open-excel-2007-documents-in-new.html' title='How to open excel 2007 documents in new a window'/><author><name>FvZ</name><uri>http://www.blogger.com/profile/11521279197143776193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7789702040925978341.post-5616378588236565626</id><published>2012-06-16T20:30:00.001-07:00</published><updated>2012-08-26T08:21:40.957-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Coding"/><category scheme="http://www.blogger.com/atom/ns#" term="Forms"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>Localizable forms in C# or How to translate your C# application in the right way</title><content type='html'>&lt;br /&gt;
As my first post I will try to give some tips of how to use localizable forms in C#, this is particularly useful if you want to give the user the option to select multiple languages in your application.&lt;br /&gt;
Visual Studio gives you some help to you in this task by letting you use the Language property of a given Form. Setting this option to a language different from default let you edit all the strings in your form and Visual Studio automatically creates a .resx file with the strings that you translated. This method allows you to change the position and size of the components in the Form (because phrases have different sizes in different languages), but unfortunately it not allows you to add or remove any of the components in the Form.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
By default when the application starts it automatically selects the language file of the current system language if that exists, if not it select the one marked as default. So if want to allow your user to set the language, save the language that it selected in a file and restore the configs when the program loads.&lt;br /&gt;
After this little introduction, let’s see a little example:&lt;br /&gt;
I created a form with 3 Buttons and a Label to show how to change the language on the fly.&lt;br /&gt;
&lt;a href=&quot;http://lh3.ggpht.com/-RkDDjYNHafc/T91PLh1fNgI/AAAAAAAAGic/BUMAsdBZ5V0/s1600-h/image7.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;143&quot; src=&quot;http://lh5.ggpht.com/-rnuemliy22M/T91PMuFpOzI/AAAAAAAAGik/wE_VZy_WHB4/image_thumb3.png?imgmax=800&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;253&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
But first let’s make or application speaks different languages =D&lt;br /&gt;
First go to the Form’s language property and change it to the language that you want to translate your application.&lt;br /&gt;
&lt;a href=&quot;http://lh6.ggpht.com/-lN65dNDtYkM/T91PNWCjTcI/AAAAAAAAGis/MzwfFvB2SSE/s1600-h/image3.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;229&quot; src=&quot;http://lh3.ggpht.com/-61W7Oq7cU1A/T91POf602bI/AAAAAAAAGi0/BkvskkPLwzg/image_thumb1.png?imgmax=800&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;299&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
After you selected the language, change the position of the components and their properties as you want. I just translated all the text to portuguese, and set the label in a different position.&lt;br /&gt;
&lt;a href=&quot;http://lh4.ggpht.com/-x7iHAB9h2zg/T91PPUGBoAI/AAAAAAAAGi8/deq99PlLZDY/s1600-h/image10.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;126&quot; src=&quot;http://lh3.ggpht.com/-AHpMPWi08bI/T91PQbC8nGI/AAAAAAAAGjE/IkJx55nSmcc/image_thumb4.png?imgmax=800&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Save the file.&lt;br /&gt;
I then changed the language to English (United States) and made it say that now our application is true American. Don’t forget to save after you finished your modifications.&lt;br /&gt;
Change the language option of the form back to (Default)&lt;br /&gt;
Now the interesting part begins, first let’s create two methods, the first one called ChangeLanguage as the name says, change the language used by the application. But there is a problem in doing that, the application doesn’t automatically refreshes the resources included in the form, so then the second method RefreshResources take it’s places.&lt;br /&gt;
&lt;div id=&quot;codeSnippetWrapper&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;
&lt;pre style=&quot;background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060;&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;//change the language in real time &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum2&quot; style=&quot;color: #606060;&quot;&gt;   2:&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ChangeLanguage(&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; lang)&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum3&quot; style=&quot;color: #606060;&quot;&gt;   3:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum4&quot; style=&quot;color: #606060;&quot;&gt;   4:&lt;/span&gt;     CurrentLocale = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; CultureInfo(lang);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum5&quot; style=&quot;color: #606060;&quot;&gt;   5:&lt;/span&gt;     &lt;span style=&quot;color: blue;&quot;&gt;foreach&lt;/span&gt; (Control c &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.Controls)&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum6&quot; style=&quot;color: #606060;&quot;&gt;   6:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum7&quot; style=&quot;color: #606060;&quot;&gt;   7:&lt;/span&gt;         ComponentResourceManager resources = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; ComponentResourceManager(&lt;span style=&quot;color: blue;&quot;&gt;typeof&lt;/span&gt;(Form1));&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum8&quot; style=&quot;color: #606060;&quot;&gt;   8:&lt;/span&gt;         resources.ApplyResources(c, &lt;span style=&quot;color: #006080;&quot;&gt;&quot;$this&quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum9&quot; style=&quot;color: #606060;&quot;&gt;   9:&lt;/span&gt;         RefreshResources(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;, resources);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum10&quot; style=&quot;color: #606060;&quot;&gt;  10:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum11&quot; style=&quot;color: #606060;&quot;&gt;  11:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum12&quot; style=&quot;color: #606060;&quot;&gt;  12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum13&quot; style=&quot;color: #606060;&quot;&gt;  13:&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;//refresh all the controls e sub-controls of the form &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum14&quot; style=&quot;color: #606060;&quot;&gt;  14:&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; RefreshResources(Control ctrl, ComponentResourceManager res)&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum15&quot; style=&quot;color: #606060;&quot;&gt;  15:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum16&quot; style=&quot;color: #606060;&quot;&gt;  16:&lt;/span&gt;     ctrl.SuspendLayout();&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum17&quot; style=&quot;color: #606060;&quot;&gt;  17:&lt;/span&gt;     res.ApplyResources(ctrl, ctrl.Name, CurrentLocale);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum18&quot; style=&quot;color: #606060;&quot;&gt;  18:&lt;/span&gt;     &lt;span style=&quot;color: blue;&quot;&gt;foreach&lt;/span&gt; (Control control &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; ctrl.Controls)&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum19&quot; style=&quot;color: #606060;&quot;&gt;  19:&lt;/span&gt;         RefreshResources(control, res); &lt;span style=&quot;color: green;&quot;&gt;// recursion&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum20&quot; style=&quot;color: #606060;&quot;&gt;  20:&lt;/span&gt;     ctrl.ResumeLayout(&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;span id=&quot;lnum21&quot; style=&quot;color: #606060;&quot;&gt;  21:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
The first function receives a string that defines the language to be set and calls the refresh method. Microsoft uses a standard that is 2 lowercase letters to identify the language plus two uppercase letters to define the country with a minus signal between they. Some examples are:&lt;br /&gt;
&lt;br /&gt;
pt-BR (Brazilian Portuguese)&lt;br /&gt;
&lt;br /&gt;
en-US (American English)&lt;br /&gt;
&lt;br /&gt;
en-GB (Britain English)&lt;br /&gt;
&lt;br /&gt;
The list of all the codes can be found &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo%28v=vs.80%29.aspx&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
The second function update the resources recursively by using the SuspendLayout() and ResumeLayout() methods, this is necessary because you can’t apply the resource file without the layout suspend. This fuction works even if you have controls inside controls, like components inside a tab.&lt;br /&gt;
&lt;br /&gt;
I will try to give the complete project for all the examples that I made.&lt;br /&gt;
&lt;br /&gt;
So here is this sample project : &lt;a href=&quot;https://dl.dropbox.com/u/6042302/Code%20Until/LocalizableApplication.zip&quot; target=&quot;_blank&quot;&gt;VS 2010 Project&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I think that’s ok for a first post, a not complicated thing to do, but useful if you boss call you and say that software need to be translated to some foreign language.&lt;br /&gt;
&lt;br /&gt;
So goodbye my friends and remember to code until …</content><link rel='replies' type='application/atom+xml' href='http://codeuntil.blogspot.com/feeds/5616378588236565626/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://codeuntil.blogspot.com/2012/06/localizable-forms-in-c-or-how-to.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7789702040925978341/posts/default/5616378588236565626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7789702040925978341/posts/default/5616378588236565626'/><link rel='alternate' type='text/html' href='http://codeuntil.blogspot.com/2012/06/localizable-forms-in-c-or-how-to.html' title='Localizable forms in C# or How to translate your C# application in the right way'/><author><name>FvZ</name><uri>http://www.blogger.com/profile/11521279197143776193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-rnuemliy22M/T91PMuFpOzI/AAAAAAAAGik/wE_VZy_WHB4/s72-c/image_thumb3.png?imgmax=800" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7789702040925978341.post-6455929680806929173</id><published>2012-06-12T13:35:00.001-07:00</published><updated>2012-06-14T19:52:25.365-07:00</updated><title type='text'>Hello World !</title><content type='html'>That&#39;s it, I finally take courage to start a technology blog to share the things that I know and the ones that I&#39;m constantly learning. Also I think this is a great opportunity to learn new things and to make some new friends.&lt;br /&gt;
&lt;br /&gt;
As a Brazilian my mother language in Portuguese (no, we don&#39;t speak Spanish here :S ) but I will write here only in English because technology speaks English. But if you are a friend that speaks &lt;i&gt;&quot;minha lingua&lt;/i&gt;&quot;, feel free to chat :D (I also study German, so maybe I can understand if you say something&lt;i&gt; &quot;auf Deustch&quot;&lt;/i&gt;).&lt;br /&gt;
&lt;br /&gt;
As I&#39;m always involved in many projects and don&#39;t have that many time to dedicate, but I will try to make the most posts that I can.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#39;m not sure about what will be my first post, but I try to find some interesting to show to you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep coding .... until it&#39;s done.</content><link rel='replies' type='application/atom+xml' href='http://codeuntil.blogspot.com/feeds/6455929680806929173/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://codeuntil.blogspot.com/2012/06/hello-world.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7789702040925978341/posts/default/6455929680806929173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7789702040925978341/posts/default/6455929680806929173'/><link rel='alternate' type='text/html' href='http://codeuntil.blogspot.com/2012/06/hello-world.html' title='Hello World !'/><author><name>FvZ</name><uri>http://www.blogger.com/profile/11521279197143776193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>