devxlogo

Tip Bank

Create a gradient background

a gradient brush is a brush that contains all the color nuances that vary from a starting color to an ending color, like the typical background screen of many installation

Dashed lines with custom caps

You can set properties of the Pen object to create custom lines. For example, you can use the DashStyle enumerated property to draw dashed lines using a predefined pattern, and

Building arrays on the fly

VB.NET supports the creation of arrays on-the-fly, by using the New operator. For example, look at the following code, that uses GDI methods to display few connected lines ‘ Get

The MapPath method

The ASP.NET Page object exposes the MapPath method, which converts a virtual path into a physical path, so it’ is useful for passing arguments to objects that don’t work with

List all running Windows processes

The System.Diagnostics.Process class exposes the GetProcesses static method, that returns a list of all running processes. It is quite easy to leverage this feature to display all running processes in

List all COM components on local machine

The following routine parses the registry and lists all the installed COM components: ‘ this code assumes that you have used this Imports statement’ Imports Microsoft.Win32′ Print ProgID, CLSID, and

Check whether Microsoft Word is installed

The .NET frameworks provides a set of classes that let you work with the Registry, so it is quite easy to create routine that looks for specific keys to determine

Launch another process in a specified directory

The System.Diagnostics.Process class provides several methods to launch and controls other Windows processes. For example, the following code sample shows how to run Notepad, pass arguments to it, and run

How to Add Tooltips Using JavaScript

By utilizing the CLASS attribute, you can assign the same set of style definitions to each tooltip. The basic syntax of the tooltip is as follows: Text to be displayedWhere