Getting Windows installed fonts using .NET

.NET Framework 2.0 namespaces System.Drawing and System.Drawing.Text contains many useful classes related to Drawing manipulation. These classes deals with fonts, fonts families, colors, images and bitmaps and can be used to add drawing related features in your .NET applications. One of the common task developers needs to perform in day to day .NET applications is to get the list of installed fonts in Windows operating system.

Getting Windows installed fonts using .NET

Read Full Tutorial

Advertisements

Creating and Using Enums in Java

In J2SE 5.0 Java introduced typesafe enumerations called “Enum” or simply “enums”. They are used to create multiple constants with a single given name. Prior to Java 5.0, you had to use static final int constants to create a list of enumerated variables as following example.

Read Full Tutorial

Posted in Java. Tags: . Leave a Comment »

Setting Controls Focus in ASP.NET 2.0

One of the very important features of current successful websites is providing better user experience to the users. As a developer you need to make sure that your website user interface is simple and easy to use. One way you can achieve this is by providing better focus management of your controls. Controls such as textboxes, listboxes or drop down lists should get focus automatically at the page load time to save user time on extra mouse clicks.

Read Full Tutorial

Cross Page Posting in ASP.NET 2.0

By default, buttons and other controls in ASP.NET pages post back to the same page that contains the control. Many times during web site development developers need to send user to a different page. We can use Server.Transfer method to move user between pages, however by using this technique the URL doesn’t change.

ASP.NET 2.0 introduced new feature that allows you to post back from one page to another, and you can obtain the values of first page controls in the target page. This feature is very useful for multi page form scenario where you want to collect different information on each page. To configure controls to get benefit of the cross page posting the control should have IButtonControl interface implemented. In .NET Framework Button, ImageButton and LinkButton all three implements the IButtonControl interface.

Read Full TutorialLive Demo

Using DriveInfo class in .NET 2.0

One of the most common task developers perform in everyday programming is to Working with the file system. This task includes navigating drives, folders and files and get some useful information for the front end application. System.IO namespace in .NET Framework 2.0 provides many classes to work with the file system. One of the class is DriveInfo class. This class represents a drive in the file system.

Read Full Tutorial

Application Domain in .NET Framework 2.0

.NET Developers often need to run an external assembly. However, running an external assembly can be a risky operation as developers have no guarantee that whether that external assembly will execute without any security breaches or not. Inefficient resource usage such as printers or file system from external assemblies can also create problems for applications. In .NET Framework Microsoft provides excellent solution to solve this problem in the form of “Application Domain”.

Application Domain in .NET Framework 2.0

Read Full Tutorial