We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

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.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

DevX - Software Development Resource

Take Care When Declaring Public Variables in VB

You can declare a variable as a public variable to make it available to all the procedures throughout the entire module. However, this not only makes the variable available to

DevX - Software Development Resource

Using XML Documents as a Database

Question: Would it be practical to use an XML document, or more accurately documents, as a database, and if so, how would you recommend doing this? I would use XML,

DevX - Software Development Resource

Dual Procedure IDS

When using VB to create a new ActiveX control with a Caption or Text property, you can set the corresponding Procedure ID to cause the Property Browser to update the

DevX - Software Development Resource

Use GetInputState in Loops

Some developers suggest putting DoEvents in loops to keep your application responsive. This is never a good idea. If the loop is short, you don

DevX - Software Development Resource

Avoid Line Input Null Problems

Sometimes you have to move information from a flat file (mainframe or ASCII text file) to a database. Usually, this flat file is a set of records, and the delimiter

DevX - Software Development Resource

Generate GUIDs With One API Call

I read a great advanced tip on how to create a GUID in “Generate Unique String IDs” [“101 Tech Tips for VB Developers,” Supplement to VBPJ, August 1999]. However, you

DevX - Software Development Resource

Use Faster Floating-Point Division

If you do a lot of floating-point division operations in VB, you can optimize these operations by multiplying by the reciprocal value. For example, instead of performing this calculation: X/Y

DevX - Software Development Resource

Maintain Call Stack for Error Tracing

I program all reusable components into DLLs or OCXs. To provide a consistent error-handling technique across all my projects, I use the Raise method of the Err object in all

DevX - Software Development Resource

Fill In the E-Mail Fields

ShellExecute is one of the most flexible Win32 APIs. Using ShellExecute, you can pass any filename, and if the file

DevX - Software Development Resource

Let Users Resize Your Controls

You can allow users to resize a control?just like in VB design mode?with a mouse, using two simple API calls. You can resize the control?top-left, top, top-right, left, right, bottom-left,

DevX - Software Development Resource

Have Your Functions Both Ways

When you create generic functions, remember that many functions are a two-way street. For example, many general utility modules contain both LoWord and HiWord functions. However, to compose a Long,

DevX - Software Development Resource

Retrieving Browseforfolder() Files

Question: I’m using a function named Browseforfolders() that uses the following code: Private Declare Function SHBrowseForFolder Lib “shell32.dll” _Alias “SHBrowseForFolderA” (lpBrowseInfo As BROWSEINFO) As Long and the declaration of this

DevX - Software Development Resource

SQL Stored Procedures and VB

Question: How do I run a SQL stored procedure from within Visual Basic? Answer: The easiest way is to use the Execute method of either the Database object (DAO) or

DevX - Software Development Resource

Recognizing variables

Question: I have two varibles, one containing the name of another varible, and one containing a string. How can can I set the varible that’s name is contained in the

DevX - Software Development Resource

Converting a Hex String to Decimal

Question: I have a database of strings of hex numbers and I want to convert them to decimal. There doesn’t seem to be a function for it, but can you

DevX - Software Development Resource

Transfering Records From One DB to Another

Question: I want to Transfer records from one Database table to other Database table but through VB. I can’t write a query such as I can for SQL Server: Insert

DevX - Software Development Resource

Building SQL in Code

Question: I am building an SQL statement to Insert and Update records. If the user enters a double quote mark in the text box the SQL statement treats this as

DevX - Software Development Resource

Pointer to Structure

Question: I have a struct: struct mystruct{ DWORD dw_Id;}*pMystruct; In the following function I want to pass the address of ‘dw_Id’ which is a member of mystruct. How do I

DevX - Software Development Resource

Use of void** in QueryInterface (COM)

Question: When using Queryinterface in COM, why is the interface pointer cast to void** andwhy is it passed as a pointer to a pointer (double indirection)? Answer: This is because

DevX - Software Development Resource

Malloc and Free

Question: If I use malloc locally in a function do I have to use free as well? Won’t someother piece of the application eventually chew up the memory I mallocd,

DevX - Software Development Resource

Changing a DOS Program to a Win32 App

Question: I’ve writen a program that simulates a heat circulation, and one of its functions performs an optimization processwhich uses a lot of dynamic memory. Myquestion is, can I use

DevX - Software Development Resource

CallByName

Question: Is there an equivalent of the CallByName function that returns a list of proprety and method names for an object? Answer: No, there isn’t. If you need that, you