Wednesday, May 13, 2009

Building a WPF Barcode Application

The referring article describes building a WPF Barcode Application using a Barcode Library. At this moment, the Barcode Library implements only the Code 39 barcode, but they promised that more will be added in the near future. Read on...

Steps for Migrating the Program to a 64-bit System

The following article describes the main steps which should be performed to correctly port 32-bit Windows applications on 64-bit Windows systems. Although the article is meant for developers using C/C++ in Visual Studio 2005/2008 environment, it will be also useful for other developers who plan to port their applications on 64-bit systems. Read more...

Monday, April 27, 2009

Using Enums

Hi Guys,
Here are the useful methods that can be utilized against the Enums:

Public Enum WeekDays
End Enum

1. The following method helps easily to load the enum names to the combo/list box
2. The following method helps easily to load all the enum values at once to an array
dim myArray as Array = [Enum].GetValues(GetType(WeekDays))
3. The following method helps easily to determine if a name or a value exists in the Enum

if [Enum].IsDefined(GetType(WeekDays), "Sunday") Then 'do something
If [Enum].IsDefined(GetType(WeekDays), 1) Then ' do something its Monday

Monday, April 20, 2009

Load a ComboBox with Installed Fonts

Hi Guys,
Here's an easiest way to load all the installed fonts to a combo box.
myComboBox.Items.AddRange (System.Drawing.FontFamily.Families);
That's it.

Reversing a string

The easiest way to reverse the string is as follows:

char[] actualDataInArray = myStringData.ToCharArray();
string reversedString = new string(actualDataInArray);

That's it.

Tuesday, April 14, 2009

Microsoft Code Analysis Tool .NET

Hi Guys,
CAT.NET is a snap-in to the Visual Studio IDE that helps you identify security flaws within a managed code (C#, Visual Basic .NET, J#) application you are developing. It does so by scanning the binary and/or assembly of the application, and tracing the data flow among its statements, methods, and assemblies. This includes indirect data types such as property assignments and instance tainting operations. The engine works by reading the target assembly and all reference assemblies used in the application -- module-by-module -- and then analyzing all of the methods contained within each. It finally displays the issues its finds in a list that you can use to jump directly to the places in your application's source code where those issues were found. The following rules are currently support by this version of the tool. - Cross Site Scripting - SQL Injection - Process Command Injection - File Canonicalization - Exception Information - LDAP Injection - XPATH Injection - Redirection to User Controlled Site. You can download this package here.

Wednesday, March 11, 2009

Getting Started with the .NET Task Parallel Library

Hi Guys,
Microsoft's new Task Parallel Library (TPL) provides a new approach for using multiple threads. It provides a set of relatively simple method calls that let you launch a group of routines all at once. This article provides an introduction to TPL. It explains the main pieces of TPL and provides simples examples. Know more...