How to install NuGet packages directly

If you are developing applications using VS 2010 Express editions, you will miss the Package Manager console, which helps us to install libraries or packages via NuGet. The Nuget package manager console is not integrated to VS 2010 Express editions.(Visual Web Developer Express is an exception, it has a package...


K-MUG - Global Azure Bootcamp – 27 April 2013 - Infopark - Kochi

The Kerala Microsoft Users Group (K-MUG) will be organizing a Global Azure Boot camp on 27th April 2013 at Info park Campus in Kochi. K-MUG is one of the best developer community in India, which got Best User Group award in India as part of Microsoft Community Impact award 2010....


How to get all controls from a form at runtime in C#

Here is a code snippet which helps you to enumerate all the controls in a form. This snippet can be used for any control, to find the child controls. public static class Extensions { public static void EnumerateChildren(this Control root) { foreach (Control control in root.Controls) { Console.WriteLine("Control [{0}] -...


Using SynchronizationContext in Windows Forms

Long back I wrote a post about how to fix - System.InvalidOperationException – Cross-thread operation not valid exception, while we try to access user interface elements from a different thread, other than the thread(normally main thread), which created the user interface elements. .NET 2.0 brings us SynchoronizationContext which allows us...


How to move a window or form without titlebar

In my current project I had to implement move for a Form, which doesn’t have a title bar or FormBorderStyle property set to None. Instead of title bar I was using a Panel with background Image. Here is the code snippet. public const int WM_NCLBUTTONDOWN = 0xA1; public const int...


Using Microsoft Ink Picture control

The InkPicture control provides the ability to place an image in an application and enable users to add ink on top of it. It is intended for scenarios in which ink is not recognized as text but is instead stored as ink. InkPicture control extends the default picturebox control. This...


How to prevent automatic screen lock in WP7

If you are developing some travel applications or fitness applications, you may want to disable automatic screen locking feature of Windows Phone. You can disable this using UserIdleDetectionMode property of PhoneApplicationService.Current class. Microsoft.Phone.Shell.PhoneApplicationService.Current.UserIdleDetectionMode = Microsoft.Phone.Shell.IdleDetectionMode.Disabled; You can find more details about Idle Detection for Windows Phone and best practices here...