
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.
Private Declare Function GetSystemMenu Lib “user32” (ByVal hWnd As Long, _ ByVal bRevert As Long) As LongPrivate Declare Function RemoveMenu Lib “user32” (ByVal hMenu As Long, _ ByVal nPosition As
It’s possible to show the list box of a combo box, with focus, using SendKeys “{F4}”. It
Use early binding by declaring variables as the correct object/interface. This will speed up procedure calls. Example: * Create a new Standard EXE Project * Add a list box to
Encapsulating settings and registry calls into property procedures is a good way to ensure valid entries. This method manages errors while including them in IntelliSense. Example: ‘mdlSettings Option Explicit Public
Sending the window message CB_SHOWDROPDOWN to the combo boxl shows the list box of a combo box. Example: * Create a new Standard EXE Project * Add a combo box
n this article, we’re presenting “passthrough,” a powerful technique for e-mail filtering I’ve never seen described by others. I particularly like it because it’s so easy to “retrofit” on existing
ErrReport provides an easy way to add centralized error reporting capabilities to applications written in Visual Basic. ErrReport has the following features: (a) Thorough diagnostic information. In addition to the
‘ convert a VB color code to the ##rrggbb format used in HTML attributesFunction ColorToHTML(ByVal color As Long) As String ‘ HTML color codes are in the format #RRGGBB (red,
‘ Encode an string so that it can be displayed correctly’ inside the browser.” Same effect as the Server.HTMLEncode method in ASPFunction HTMLEncode(ByVal Text As String) As String Dim i
‘ 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 =











