For me, those pamphlets where the most eagerly waited part of my VBPJ publication. Here are the links to PDF versions.
VBPJ TechTips #1
VBPJ TechTips #2
VBPJ TechTips #3
VBPJ TechTips #4
VBPJ TechTips #5
VBPJ TechTips #6
VBPJ TechTips #7
VBPJ TechTips #8
VBPJ TechTips #9
VBPJ TechTips #10
VBPJ TechTips #11
VBPJ TechTips #12
I learned sooooo much from these. The loss of these publications is just one of the reasons that VSM is just a shadow of VBPJ. Just for a walk through memory lane I read through some of them, seeing if any of them would apply to C# today. Most of the tips were not transferable, but a few could be.
So, here is the first "New" C# TechTip: Originally by Karl E. Peterson
How to add an AutoTab feature to textboxes that have a set MaxLength. Connect the textboxes' TextChanged Event to this function:
Code Snippet
- private void textBox_TextChanged(object sender, EventArgs e)
- {
- if((sender as TextBox).MaxLength == (sender as TextBox).TextLength) SendKeys.Send("{TAB}");
- }
Who knew that the Dot Net designers had included the SendKeys function!?!
2 comments:
Should be
(sender as TextBox).Text.Length)
I think anyway.
Cheers was a helpful read.
Actually, both ways work, see:
http://msdn.microsoft.com/en-us/library/system.windows.forms.textboxbase.textlength.aspx
Post a Comment