Tip Bank

DevX - Software Development Resource

Copy Listview Contents to a Clipboard

This easy routine copies the contents of a listview, including column headers, to the clipboard for pasting into Excel or other applications: Public Sub SendToClipboard(ByVal ListViewObj _As MSComctlLib.ListView)Dim ListItemObj As

DevX - Software Development Resource

Create a VB Error Message Reference List

Have you ever wanted to have a hard copy listing all the VB error messages? Create a new standard EXE VB application and drop this code into the Load event

DevX - Software Development Resource

Clipping the mouse to a rectangle area

The Clip property of the Cursor is the rectangle within which the mouse cursor is confined, or its value is Nothing if the mouse can move over the entire screen.

DevX - Software Development Resource

Pasting data from the Clipboard

Pasting data from the clipboard requires more code because you must ascertain whether the clipboard contains data in one of the formats you’re willing to process. First, use the Clipboard.GetDataObject

DevX - Software Development Resource

Parse URLs with the System.Uri class

The Url and UrlReferrer properties of the Request ASP.NET object return a reference to the URL of the page and the URL of the page that referred to this one.

DevX - Software Development Resource

Sending files to the browser

The ASP.NET Response object has been greatly expanded in its capability to send output to the client browser. For example, the WriteFile method can send the contents of any text,

DevX - Software Development Resource

ASP.NET process recycling

Application recycling is a great feature that lets you configure an application so that ASP.NET automatically shuts it down and restarts it after a given period or a given number

DevX - Software Development Resource

Discern among servers with the MachineName property

As in classic ASP, you can use the Server object from inside any ASP.NET application. This property returns a reference to an HttpServerUtility class.The HttpServerUtility class exposes only two properties:

DevX - Software Development Resource

Saving HTTP requests for better debugging

The new SaveAs method of the Request object saves the current HTTP request to a file, which can be very useful for logging and debugging reasons. You should pass True