October 27, 2001

BackgroundCircularGradient – Paint a circular background gradient

Private Declare Function RealizePalette Lib “gdi32″ (ByVal hdc As Long) As Long’ Paint a circular gradient” STARTCOLOR is the starting color (applied to the corner)’ ENDCOLOR is the ending color (applied to the center point)’ NUMSTEPS is the optional number of stripes (default is 256)’ XC, XY are the coordinates

GetDirectorySize – Evaluate disk space used by files and subdirectories

‘ Retrieve the number of bytes by all the files in a directory’ (it doesn’t account for slack space, that is unused space in disk sectors)” If INCLUDESUBDIRS is true, it recursively parses all subdirectories.” supports only up to 2G directories.Function GetDirectorySize(ByVal Path As String, Optional includeSubdirs As _ Boolean)

BackgroundVerticalGradient – Paint a vertical gradient background

Private Declare Function RealizePalette Lib “gdi32″ (ByVal hdc As Long) As Long’ Paint a vertical gradient” STARTCOLOR is the starting color (applied to top border)’ ENDCOLOR is the ending color (applied to bottom border)’ NUMSTEPS is the optional number of stripes (default is 256)” Example: a vertical gradient from blue

BackgroundHorizontalGradient – Paint an horizontal gradient background

Private Declare Function RealizePalette Lib “gdi32″ (ByVal hdc As Long) As Long’ Paint an horizontal gradient” STARTCOLOR is the starting color (applied to left border)’ ENDCOLOR is the ending color (applied to right border)’ NUMSTEPS is the optional number of stripes (default is 256)’ Example: a gradient from black to

LanCardAddress – Read the Ethernet address of a LAN card

Const NCBNAMSZ = 16Private Type NCB ncb_command As Byte ncb_retcode As Byte ncb_lsn As Byte ncb_num As Byte ncb_buffer As Long ncb_length As Integer ncb_callname As String * NCBNAMSZ ncb_name As String * NCBNAMSZ ncb_rto As Byte ncb_sto As Byte ncb_post As Long ncb_lana_num As Byte ncb_cmd_cplt As Byte ncb_reserve(9)

Database Paging Just by Query

In Web development, putting too many records from the database into the Web server is memory intensive processing. This is where the concept of paging comes form. At any point in time, you display only a few records to the user (for ex. 10 no.). This is helpful if the

How to Make Multi-segment Applications in Palm OS

In Palm OS, the memory chunk size is 64K. To make applications larger than this, you have to split the applications into segments less than 64K. These are called multi-segment applications. Multi-segment applications can be created with the help of a constructor. One major point to take care of is

Dynamically Add a URL to Favorites on the Browser

This can be used when you want your users to BookMark your site or add your site address to their favorites list. The following Javascript function can be called whenever the link to be added is clicked.

Add Options Dynamically to the Select Control on Client Side

Normally, options in select control will be added at design time or will be created on the server site. This code explains how to add options to the select control dynamically on the client side. This allows the visitor to add options on the client side and submit it to

No more posts to show