One of the great string methods that was introduced in dotNet 2.0 is ‘IsNullOrEmpty’
Navigation to controls in the toolbox has finally gotten easier now, in Visual Studio.Net 2010. You can actually type to get to the control you want. The sections in which they reside don’t even need to be open.
There’s are a couple of form properties that kind of sneaked in DotNet development a while back. They are: AcceptButton CancelButton
The first way is pretty self-explanatory – you create it from scratch. When you create a new Windows Forms application, a default Windows Form is present. Just change the isMDIParent property to True and voila – you’re on your way to working with an MDI application.
When working with the TabControl in your Windows application, in order to programmatically choose the tab you want to show, use the SelectedIndex property of the TabControl: TabControl1.SelectedIndex=2
Here’s the code function that iterates through the open MDI children to see if a certain form is already open, before opening it:
In order to iterate through all the textboxes on a form, and remove the text from all of them, you can use the following In order to iterate through all the textboxes on a form, and remove the text from all of them, you can use the following code:
If you’ve worked with comboboxes before, you’ll notice that the SelectionMode property has 2 different types of multiple selections. One is MultiSimple and the other is MultiExtended. The difference is as follows.
With the last few versions of Visual Studio, it’s become very easy to create menus on your form. You just go to the Toolbox, find the Menus and Toolbars section and drag a MenuStrip onto your form. From there, you just type in what you want for your menu items. However, the more items you […]
In the old days, appending text to a textbox meant concatenation – something like: TextBox1.Text=TextBox1.Text + myNewText or: TextBox1.Text+=MyNewText Instead of this, we now have: TextBox1.Text.AppendText(MyNewText) This is for a use in which the StringBuilder class would be overkill. Plus, this has much less overhead than the older concatenation method also. It’s faster and more […]
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF