winforms

Complete Guide to Lazy Loading in C#

5 minute read

In creating performance-centric applications one has to be very cautious about how and when objects are created and destroyed.  An early creation of an objec...

Winform Tip#10: Getting File Properties

less than 1 minute read

Instantiate a FileInfo object with the full path as constructor arg. Then simply call FileInfo.Extension and you will get just the extension of the file.   F...

Winform Tip#9: ColorPicker

less than 1 minute read

Choose a textbox over which we will test this experiment: [sourcecode language='csharp'] ColorDialog colorDialog1 = new ColorDialog(); //fontDialog1.ShowColo...

Winform Tip#7:Browser within Winform

less than 1 minute read

WebBrowser control can be used inside a form to display HTML contents and listen to events such as NavigateComplete or BeforeNavigate Use of ActiveX wrappers...

Winform tip#6:DataGrid vs DataGridView

less than 1 minute read

DataGridView is an enhanced version of DataGrid.  Some of the features lacking in DataGrid are: Multiple column types Multiple ways to display data Multiple...

Winform Tip#4: Deployment in Winform

less than 1 minute read

Best way to deploy is by using ClickOnce deployment. This allows user to get regular updates, patches to the product while conforming to the security standar...

Finding currently focused control

less than 1 minute read

Good question!  Now, this was a question in one of my sessions at Microsoft Community at Cognizant.  We need to use User32 API's to do this stuff. It isn't t...

Winform Tip#1: Transparent Form

less than 1 minute read

The opacity property enables you to specify a level of transparency for the form and its controls. See the .NET documentation for Form.Opacity for difference...

ComboBox Sorting Defect!

less than 1 minute read

Oops! Never expected this behavior from such a standard control: Winforms ComboBox. One of the common things our applications require is bind a data source w...