avatar

Andres Jaimes

How to create a simple gradient in C#

Creating a simple gradient using two colors is very simple:

1Rectangle rect = new Rectangle(0, 0, 100, 100);
2LinearGradientBrush lgb = new LinearGradientBrush(rect, Color.White, Color.Blue, 90);
3e.Graphics.FillRectangle(lgb, rect);

This code will …

Printing in C# – The easy way

Believe me, it is easy. As with any class, before we can use any of the Classes, Events and Objects available to us in the .Net Framework we need to import the Namespaces we need. For this we need 3 namespaces. VB.Net users only required 2 because …

How to choose a printer using C#

You can assign a printer and other settings by using the basic PrintDocument and PrintDialog controls properties. Look at the next example:

1if (printDialog.ShowDialog() == DialogResult.OK) {
2    printDocument.PrinterSettings.PrinterName = …

C# Tips and Tricks

Reading Outlook Contacts

Have you ever realized all you can do if Outlook contacts information were located into a database? If you have, this tip is for you. The first step is to take all that information out from Outlook so we can transform it into …

Some words on Java, C# and C++

I have always considered myself a C++ guy. That was one of the first languages I learned. But, life has taken me through many different paths, and I have needed to learn others. It was seven years ago, when I tried my first cup of Java and I realized …