
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.
‘ convert a string so that it can be used on a URL path” Same effect as the Server.URLPathEncode method in ASPFunction URLPathEncode(ByVal Text As String) As String Dim i
‘ Create a HTML table from a recordset” set the TableAttribs argument to a suitable value’ (eg “BORDER=1”) to modify the table’s standard layout’ you should omit the NullValues argument
‘ convert a string so that it can be used on a URL query string” Same effect as the Server.URLEncode method in ASPFunction URLEncode(ByVal Text As String) As String Dim
‘ Decode an HTML string to a regular ANSI string” it strips down all special HTML sequences (eg “<“)’ however, it doesn’t strip HTML tagsFunction HTMLDecode(ByVal html As String) As
Private Declare Function FindWindow Lib “user32” Alias “FindWindowA” (ByVal _ lpClassName As String, ByVal lpWindowName As String) As LongPrivate Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal _ hWnd As
Windows only permits 1024 active bitmap/icon handles to be in use at any time. The UniPicture control provides a method to store data for more than 1024 Bitmaps/Icons without depleting
Const DM_BITSPERPEL As Long = &H40000Const DM_PELSWIDTH As Long = &H80000Const DM_PELSHEIGHT As Long = &H100000Const CCDEVICENAME As Long = 32Const CCFORMNAME As Long = 32Private Type DEVMODE dmDeviceName As
Private Declare Function SystemParametersInfo Lib “user32” Alias _ “SystemParametersInfoA” (ByVal uAction As Long, ByVal uParam As Long, _ ByRef lpvParam As Any, ByVal fuWinIni As Long) As LongConst SPI_GETLOWPOWERTIMEOUT =
Private Declare Function SystemParametersInfo Lib “user32” Alias _ “SystemParametersInfoA” (ByVal uAction As Long, ByVal uParam As Long, _ ByRef lpvParam As Any, ByVal fuWinIni As Long) As LongConst SPI_SETLOWPOWERTIMEOUT =
Private Declare Function WNetGetUser Lib “mpr.dll” Alias “WNetGetUserA” (ByVal _ lpszLocalName As String, ByVal lpszUserName As String, _ lpcchBuffer As Long) As Long’ return the current default user name or’
Option ExplicitConst DM_BITSPERPEL As Long = &H40000Const DM_PELSWIDTH As Long = &H80000Const DM_PELSHEIGHT As Long = &H100000Const CDS_FORCE As Long = &H80000000Const CCDEVICENAME As Long = 32Const CCFORMNAME As Long
Private Declare Function NetGetDCName Lib “netapi32.dll” (strServerName As Any, _ strDomainName As Any, pBuffer As Long) As LongPrivate Declare Function NetApiBufferFree Lib “netapi32.dll” (buffer As Any) As _ LongPrivate Declare
Private Declare Function FindWindowEx Lib “user32” Alias “FindWindowExA” (ByVal _ hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, _ ByVal lpsz2 As String) As Long’ return True
The Zoom control assists with the display of data from lookup tables. Developers want to hide Foreign Keys from users and display instead the descriptive value from the lookup table,
In my latest article here at VB-2-The-Max (“COM+ Centric Assert“) I promised to deliver a three-part article about tracing. Here I am. Santa Claus is fulfilling your wish list for
Private Type SERVICE_STATUS dwServiceType As Long dwCurrentState As Long dwControlsAccepted As Long dwWin32ExitCode As Long dwServiceSpecificExitCode As Long dwCheckPoint As Long dwWaitHint As LongEnd TypePrivate Declare Function OpenSCManager Lib “advapi32.dll”
Option ExplicitPrivate Type SERVICE_STATUS ‘ 28 bytes dwServiceType As Long dwCurrentState As Long dwControlsAccepted As Long dwWin32ExitCode As Long dwServiceSpecificExitCode As Long dwCheckPoint As Long dwWaitHint As LongEnd TypePrivate Type
Private Const TH32CS_SNAPPROCESS As Long = 2&Private Const MAX_PATH As Integer = 260Private Type PROCESSENTRY32 dwSize As Long cntUsage As Long th32ProcessID As Long th32DefaultHeapID As Long th32ModuleID As Long
Const EWX_LOGOFF = 0Const EWX_FORCE = 4Private Declare Function ExitWindowsEx Lib “user32” (ByVal dwOptions As Long, _ ByVal dwReserved As Long) As Long’ close all applications and log off the
Private Type LUID lowpart As Long highpart As LongEnd TypePrivate Type TOKEN_PRIVILEGES PrivilegeCount As Long LuidUDT As LUID Attributes As LongEnd TypeConst TOKEN_ADJUST_PRIVILEGES = &H20Const TOKEN_QUERY = &H8Const SE_PRIVILEGE_ENABLED =
Private Type LUID LowPart As Long HighPart As LongEnd TypePrivate Type TOKEN_PRIVILEGES PrivilegeCount As Long LuidUDT As LUID Attributes As LongEnd TypeConst TOKEN_ADJUST_PRIVILEGES = &H20Const TOKEN_QUERY = &H8Const SE_PRIVILEGE_ENABLED =
If TAPI libraries are installed on your machine, you can easily dial a number from a VB application using a single API call. Here’s a function that encapsulates the call
‘ Display a text with 3D effect” OBJ can be a form or a PictureBox’ TEXT is the text to be displayed’ X, Y are the coordinate (in twips or
The following function is an efficient way of converting strings from one character set to another. Using an array of 256 characters as a conversion table, the attached function replaces
Many times, a program crashes due to multiple deletes on the same pointer. In some cases, this is due to a programming error that can be removed. There are situations,
It’s common practice in C, to do a memset on structures, in order to initialize all member variables to some default value, usually NULL. Similarly, you can use memset to
It is common knowledge that the only difference between a struct and a union in C is that all elements of a union share the same memory location but the
I have frequently seen bulletin board requests on how to create MSACCESS databases with VB. To do this, add a reference to the Microsoft DAO _._ Object Library (I am
ComboBox controls, out of the box, don’t help complete phrases as they are typed in. The sample code below accomplishes that task. cmb is the name of the ComboBox to
An object in a Netscape Directory Server can only be deleted if it is a terminal node. This restriction causes the writing of source code to delete an object and










