The scenario for this tutorial/code sample is simple. You have 2 listboxes. You want to copy items from one item to the other, and since they are in the second listbox, you want to remove them from the first one. Sounds simple, right?
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 […]
To create an MDI (Multiple Document Interface) application in your Winforms Project, start with creating a new WinForms project. This creates one main form for the application. Go to the Properties window for this form and set the ‘IsMDIContainer’ to TRUE. This sets up the form as an MDI container for child windows. Being that an […]
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 […]
It’s not directly intuitive how to do this, since, when you add a label to a form, there is no ‘Tooltip’ property for it. All you need to do is to drop a ToolTip control from the ToolBox, on your form. It will appear in the tray below the form, and not ON the form […]
Many times, you need to have a label and you want it centered on the form at all times, even after sizing of the form, and you want it to stay at the bottom. Something you might use this for could be a copyright statement. DotNet provides very good support for this.
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF