devxlogo

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

Set DIV Clipping Height

Question: I am inserting some text into a DIV in Netscape using the .open, write(), and close() methods. At first there is nothing in the DIV, and when I check

Write concise code: a collection of simple tips

If you fully understand how VB and VBA work, you can often save some statements. This makes your listings more concise and more readable, and indirectly optimizes your program. Here

Write concise code with the InStr function

You can often use the Instr function in an unorthodox way to write more concise code. A typical example is when you need to test a single character: ‘ test

Write concise code with the IIf function

Use IIf when setting a value based upon an expression. This works only in situations where you have two choices, based upon the result of a Boolean expression. ‘long wayIf

Write concise code with Boolean expressions

When setting a Boolean value based upon the result of an expression, avoid using an unnecessary If/Then/Else structure. ‘Instead of using this lengthy syntax . . .If SomeVar > SomeOtherVar

Write concise code with the Switch function

Many VB developers don’t realize that the Switch built-in function can often save a lot of code. This function takes any number of (expr, value) pairs, it evaluates all expressions

Write concise code with the Choose function

The Choose function lets you often make more concise, albeit not faster, code, because it lets you replace a lengthy Select Case block. For example, the following code: Select Case

Counter in For-Next Statement

It is always easy for people who know Visual Basic to write code inVBScript. But sometimes you make some common mistakes because of the implementation differences between VB and VBScript.One

Rebuild Master Database

If you want to rebuild the master database you can run Rebuildm.exe command prompt utility. This utility allows you to rebuild the master database to change the character set, sort

Generic Listbox Columns Routine

Use the SendMessage API to set tab stops in a VB listbox by creating these declarations and this routine in a module: Private Declare Function SendMessage Lib _ “user32” Alias

Use IsLoaded to Check for Forms

The IsLoaded function tests to determine if any instances of a form are already loaded or exist in memory: If IsLoaded(“frmMyForm”) Then Debug.Print “frmMyForm is loaded”End IfPublic Function IsLoaded(sForm As

CheckboxGroup

Question: I am trying to put all the checkboxes in a CheckboxGroup into anunselected state, but Checkbox.setState(false) does notautomatically unselect the checkbox once a checkbox has been selectedwithin a CheckboxGroup.

Servlet Attributes and Parameters

Question: When a request message is processed through the HttpServlet doGetmethod, who sets the parameters and attributes for theHttpServletRequest argument? And what is the difference between anattribute and a parameter?

Simple HTML Display

Question: How can I have my servlet display an HTML file,located on the server, on the client’s browser? Answer: The HttpServlet class makes it very simple to send and receiveinformation

Enterprise JavaBeans

Question: What is the basic difference between JavaBeans and Enterprise JavaBeans? Answer: JavaBeans are a set of conventions and APIs for creating reusablesoftware components. The primary benefit is for visual

Binary Representation of a Char

Question: How can I get the binary representation of a letter or number? Forexample, the letter “A” is 100 0001, the letter “B” is 100 0010, etc… Answer: You can

Getting Started with Exchange

Question: I am in the process of installing Exchange 5.5 for the first time. I need some help understanding the basic concepts of this system. How do I get the

Use Recordset.Supports() Method for Robust Code

You can use Supports() method of ADODB.Recordset object to write robust code. This method takes in a enum parameter and returns a boolean value which can be used to determine

Avoid Typedefs When Defining Structs

In olden days, before C++ appeared, it was customary to declare a struct as a typedef name. For example: typedef struct DATE_TAG { int day; int month; int year; }

Display Popup Windows

Here is a simple way to provide popup window functionality in your Webpages. The idea is to display a popup window if the user moves the mouseover certain text areas

Translate Color Values Faster

This tip is an update to “Translate Color Values”. That method converted numbers to strings, then performed string manipulation to get individual RGB values. This solution uses a concept near

Avoid Excessive use of Fully Qualified Names

To some extent, the use of fully qualified names is the recommended way of referring to namespace members because it uniquely identifies and yet it avoids name conflicts. For example:

Loading Dynamic Forms

Question: I have a menu system that loads the name of a form into the appropriate menu item. How would you load the form from that item, considering that when

Arctan Function Problems

Question: I have to use the arctan function but there are onlyarcsin and arccos in VB. And arctan is not equal toarcsin/arccos. I have lost almost all of my trigonometry

Adding a New Label at Run Time

Question: I have been unable to add a new label onto my form at run time because the ‘new’ command doesn’t seem to work for a label. What’s the best

Difference Between Subs and Functions

Question: As new to Visual Basic, I am having trouble understanding the difference between Sub a Procedure and a Function Procedure. And I would also like to know where and

ADO Data Control

Question: I hope that you might be able to help me with the problem I am experiencing. I am developing an application in VB6 using ADO Data Control. I need

Dynamically Change the Title of an HTML Page

Here is a simple way by which you can dynamically change the title of the browser window (or an HTML page). There are certain scenarios where you can use this

Check if Provider Supports Transactions

A transaction can be defined as a related set of operations that read and modify data in a single batch. Every transaction should follow the ACID rule, where ACID stands