<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SYSK 87:  A Better MaskedTextBox For Currency Fields</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx</link><description>You may want to save this one off and put it in your personal toolbox… The MaskedTextBox that comes with .NET has a few limitations – it does not automatically shift your digits. For example, if I enter a mask of 0000.00, and enter number 12, I’d expect</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: SYSK 87:  A Better MaskedTextBox For Currency Fields</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#605407</link><pubDate>Wed, 24 May 2006 02:52:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:605407</guid><dc:creator>Ray  Muirhead</dc:creator><description>Thank you Irena - this is great!</description></item><item><title>re: SYSK 87:  A Better MaskedTextBox For Currency Fields</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#606304</link><pubDate>Wed, 24 May 2006 22:47:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:606304</guid><dc:creator>Joel@YA</dc:creator><description>Thanks for this. &amp;nbsp;As a suggestion, some comments in the code would be helpful. &amp;nbsp;If I wanted to expand this to include support of '##' hash marks, what would that look like?</description></item><item><title>Adam Caudill&amp;#8217;s Blog &amp;raquo; MaskedTextBox Madness</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#608772</link><pubDate>Sat, 27 May 2006 18:45:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:608772</guid><dc:creator>Adam Caudill’s Blog » MaskedTextBox Madness</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://adamcaudill.com/2006/05/27/maskedtextbox-madness/"&gt;http://adamcaudill.com/2006/05/27/maskedtextbox-madness/&lt;/a&gt;</description></item><item><title>A Currency MaskedTextBox for .NET 2.0</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#642086</link><pubDate>Thu, 22 Jun 2006 01:17:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:642086</guid><dc:creator>Sven's Blog</dc:creator><description>At a customer's site, an application needed to format and accept formatted input for currencies. They...</description></item><item><title>Culture and Thousand Separator Awareness</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#642089</link><pubDate>Thu, 22 Jun 2006 01:18:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:642089</guid><dc:creator>Sven Aelterman</dc:creator><description>I've added comments to Irena's code, and then set out to add support for non-US English cultures and the thousand separator.&lt;br&gt;&lt;br&gt;The result is available through &lt;a rel="nofollow" target="_new" href="http://www.adduxis.com/blogs/blogs/sven/archive/2006/06/21/18.aspx"&gt;http://www.adduxis.com/blogs/blogs/sven/archive/2006/06/21/18.aspx&lt;/a&gt;</description></item><item><title>re: SYSK 87:  A Better MaskedTextBox For Currency Fields</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#1491723</link><pubDate>Fri, 19 Jan 2007 08:16:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1491723</guid><dc:creator>NickO</dc:creator><description>&lt;p&gt;Shifting of numbers to the left is the least of problems I'd worry about.&lt;/p&gt;
&lt;p&gt;Try to set the Mask = &amp;quot;####.##&amp;quot;, then set&lt;/p&gt;
&lt;p&gt;maskedtextbox1.text = &amp;quot;15.25&amp;quot;&lt;/p&gt;
&lt;p&gt;The resul yo'd get is 1525. &amp;nbsp;&amp;quot;. The mask completely ignores the decimal point.&lt;/p&gt;
&lt;p&gt;You are right: you'd need to write a function that would take care of inefficiencies of Masked Textbox design&lt;/p&gt;
&lt;p&gt;NickO&lt;/p&gt;</description></item><item><title>SYSK 87:  Reply to NickO</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#1493305</link><pubDate>Fri, 19 Jan 2007 18:32:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1493305</guid><dc:creator>irenak</dc:creator><description>&lt;p&gt;Use zeros instead of # in your mask; e.g. Mask = &amp;quot;0000.00&amp;quot; and you should get the expected result&lt;/p&gt;
</description></item><item><title>re: SYSK 87:  A Better MaskedTextBox For Currency Fields</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#1770792</link><pubDate>Wed, 28 Feb 2007 00:45:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1770792</guid><dc:creator>Rodel E. Dagumampan</dc:creator><description>&lt;p&gt;hi irena, nice post but i have some comments. it is better if you will use the CultureInfo and CurrentCulture of the applications so you can use the correct decimal separators, parethesis, currency symbols and numbver digits. Replacing &amp;quot;$&amp;quot; sign is no good to me eso for multi-currency applications such as e-commerce, trading, sales automations and erp.&lt;/p&gt;</description></item><item><title>re: SYSK 87:  A Better MaskedTextBox For Currency Fields</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#7131631</link><pubDate>Wed, 16 Jan 2008 17:23:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7131631</guid><dc:creator>mike</dc:creator><description>&lt;p&gt;Do you have a VB.NET implementation?&lt;/p&gt;</description></item><item><title>re: SYSK 87:  A Better MaskedTextBox For Currency Fields</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#8718554</link><pubDate>Thu, 10 Jul 2008 23:41:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8718554</guid><dc:creator>Valmir</dc:creator><description>&lt;p&gt;I've found a simplier way:&lt;/p&gt;
&lt;p&gt;private void maskedTextBox1_KeyPress(object sender, KeyPressEventArgs e)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; string buff = &amp;quot;&amp;quot;;&lt;/p&gt;
&lt;p&gt; int i;&lt;/p&gt;
&lt;p&gt; if (maskedTextBox1.MaskCompleted)&lt;/p&gt;
&lt;p&gt; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;e.Handled = true;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;return;&lt;/p&gt;
&lt;p&gt; }&lt;/p&gt;
&lt;p&gt; char[] chars = maskedTextBox1.Text.PadLeft(5, ' ').ToCharArray();&lt;/p&gt;
&lt;p&gt; for (i = 0; i &amp;lt; chars.Length-1; i++)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; chars[i] = chars[i+1];&lt;/p&gt;
&lt;p&gt; chars[i] = e.KeyChar;&lt;/p&gt;
&lt;p&gt; for (i = 0; i &amp;lt; chars.Length; i++)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; buff += chars[i];&lt;/p&gt;
&lt;p&gt; maskedTextBox1.Text = buff;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;</description></item><item><title>re: SYSK 87:  A Better MaskedTextBox For Currency Fields</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#8769347</link><pubDate>Thu, 24 Jul 2008 16:57:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8769347</guid><dc:creator>Vikash</dc:creator><description>&lt;p&gt;I am using a masked textbox to i\p date in following format dd-MMM-yyyy. I've set the mask property as 00-AAA-0000 However if i assign text property of Masked textbox to a value like 11Jul2008 i can not delete first two characters from the masked textbox unless i delete remaining six characters first. Any idea what could be the reason.&lt;/p&gt;</description></item><item><title>re: SYSK 87:  A Better MaskedTextBox For Currency Fields</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#8831163</link><pubDate>Mon, 04 Aug 2008 17:29:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8831163</guid><dc:creator>Netcigos</dc:creator><description>&lt;p&gt;Hi I made a Inherited control about it. But It don&amp;#180;t work like see in this post. I put the control on a win forms , and then put the mask 0000.00. When i imput the digit in the control , it don&amp;#180;t shift the digit to right.&lt;/p&gt;
&lt;p&gt;Any boy can tell me how use this control on a win form.&lt;/p&gt;</description></item><item><title>&amp;raquo; MaskedTextBox and Custom Types</title><link>http://blogs.msdn.com/irenak/archive/2006/03/21/sysk-87-a-better-maskedtextbox-for-currency-fields.aspx#9407185</link><pubDate>Sun, 08 Feb 2009 20:12:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9407185</guid><dc:creator>&amp;raquo; MaskedTextBox and Custom Types</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.sascha-hennig.de/csharp/maskedtextbox-and-custom-types"&gt;http://www.sascha-hennig.de/csharp/maskedtextbox-and-custom-types&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>