The Latest

DevX - Software Development Resource

CloseDosWindow – Close a Ms-Dos console window

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

DevX - Software Development Resource

The Unipicture control

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

DevX - Software Development Resource

GetPDCName – The name of the Primary Domain Controller

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

DevX - Software Development Resource

The Zoom Control

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,

DevX - Software Development Resource

A Trace Tool, Part 1

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

DevX - Software Development Resource

GetServicesInfo – Enumerate Windows NT services

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

DevX - Software Development Resource

LogOffUser – Shut down the current user session

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

DevX - Software Development Resource

KillProcess – Terminate any application

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 =

DevX - Software Development Resource

ShutDownWindows – Shut down and reboot the operating system

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 =

DevX - Software Development Resource

Make a phone call using TAPI

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

DevX - Software Development Resource

Print3D – Display text with 3D effect

‘ 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

DevX - Software Development Resource

Avoiding Crashes Due to Multiple Deletes

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,

DevX - Software Development Resource

Using Memset On Class Objects

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

DevX - Software Development Resource

Structs and Unions

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

DevX - Software Development Resource

Creating an MSACCESS Database through VB

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

DevX - Software Development Resource

ComboBox Autofill

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

DevX - Software Development Resource

A Quick Way to Register and Unregister DLLs

It’s really a pain to continually register, unregister, and reregister a DLL (or worse, many DLLs) using REGSVR32. Importing the following into your registry, allows you to set up options

DevX - Software Development Resource

Calling a Servlet From a JSP and Vice-Versa

Servlets and JSPs are the defacto method of server side computing today. Servlets form the logic of the application code and formatting for output is done with the help of