The Latest

DevX

Enumerating Methods of a Class

Question: How can I enumerate the methods of an object? I know there must be away since JBuilder and other IDEs know how to populate a list ofmethods from a

DevX

Select All Checkboxes

Question: I have several checkboxes and I want one checkbox tocause all of the checkboxes to be selected when it is selected. Howcan I do this? Answer: Even though the

DevX

JPasswordField

Question: How do I access the contents of a JPasswordField to see if it matcheswith the correct password? Answer: Before using a class, it helps to examine all of the

DevX

SystemCalls

Question: Is there any method (MFC, Win32) to get the contents of the systemvariable “PATH”? Answer: Sure there is. Use the standard function getenv() for this purpose: #include { char

DevX

Mouse Click Coordinate

Question: I know how to detect a mouse click with a MouseListener, but how doI obtain the coordinates associated with the click? Answer: If you already know how to detect

DevX

Database Field Types

Question: How do I get a string representation of a database field using JDBCregardless of its type? In other words, I have to use the getInt(),getDate(), getString(), etc., to get

DevX

RE: Date Arithmatic in Java

Question: I previously asked a question that may not have been worded as clearlyas possible and you answered something slightly different from what Iwas looking for. I want to know

DevX

Enumeration Types

Question: Can you make an array of enumeration types?If so, how do you do it? Answer: Yes you can, and it is very simple: enum direction { Up, Down};direction arr[10];

DevX

InetAdress.getAllByName

Question: When I use InetAdress.getAllByName(String host) on my workstation,I get two IP addresses. One is for the LAN connection and the other isfor the dialup connection. I need to get

DevX

Produce Shrinking Text

Use this code to get the shrinking text effect?similar to the opening of Star Wars: ‘ Requires a Label and Timer on the formPrivate Sub Form_Load() With Me .BackColor =

DevX

Replace a String Within a String, Recursively

I recently needed a substring replacement function for inserting code into a module, by reading the code from a file. Unfortunately, in my case, commas are interpreted as delimiters, and

DevX

Cache Properties for Repeated References

If you have to reference a control’s property repeatedly, it’s better to assign the property to a temporary variable, then use that variable. This technique is called property caching. For

DevX

Force Slider to Specific Intervals

Try using a slider control in your UI if you’re tired of combo boxes. Users find this control intuitive to understand and operate. For example, you might use the slider

DevX

Sort Non-String Items in a ListView

Sorting ListView columns with numeric data can be a real pain. Nonstring sorting is possible with callbacks using custom comparison functions, but this method’s drawback is that the synchronization between

DevX

Determine the Correct Screen Dimensions

The latest video drivers can change the display resolution without rebooting. Unfortunately, the Screen object doesn’t always properly return the new display size; it only remembers the display size when

DevX

Clear Form’s Controls With Quick Loop

This code allows you to set a form’s controls to a specific value. You can use it, for example, when you want to clear all textboxes in a form or

DevX

Use the MsgBox Wrapper to Replace OK

Replace all MsgBox calls that display only an OK message with the following OkMsg sub. It automatically defaults the icon to vbInformation, and the title to a global constant defined

DevX

Determine the File System Type

With the advent of the FAT32 file system, you might want to use VB to determine the type of file system being used for a particular drive. This example is

DevX

Use Loop Counters Even After Looping

The value of a loop counter variable is incremented one beyond the set range when the loop is completed. For example, if you use a For i = 0 to

DevX

Reattach and Refresh SQL Links

You often need to reattach or refresh links in Microsoft Access. This code refreshes all currently linked tables to sync the attached tables with the server, then remove “dbo_” from

DevX

Iterate MDIChild Forms

Sometimes it’s useful to close Related Posts How EdTech is Making Higher Education More Accessible WorldwideSurvey: 74% of Businesses Say IoT Will Help Them Meet Key ObjectivesUnlock the Torque 35

DevX

Link the DataField to the Recordset

The data control allows you to quickly link controls and databases; however, not only is it far from flexible compared with the database-objects coding interface, it doesn’t look great. I

DevX

Count the Occurrences of a Character or Substring

VB6 introduced the Split function, which returns a zero-based, one-dimensional array containing a specified number of substrings. Although this function is useful in itself, you can also use it in

DevX

Duplicate the Split Function for VB4 and VB5

It’s too bad Microsoft didn’t create the Split function until VB6, but here’s a function that duplicates it for VB4 and VB5 users. The only difference is that with VB4

DevX

Simplify Programatic Selection in Combos

Here’s a useful procedure to position a ComboBox according to a value of the ItemData property or the List property. It’s useful to position a ComboBox with values taken from

DevX

Change Dates With Plus and Minus Keys

This simple piece of code saves a lot of headaches when it comes to altering dates. It allows you to use the plus and minus keys to increment and decrement

DevX

Convert Static Variables for More Speed

Referencing a static local variable in a procedure is two to three times slower than a regular local, dynamic variable. If your procedure demands every last bit of speed possible,

DevX

Web-Enable Your Apps

In today’s world, you probably want to let your users browse the Web inside your app. You can add the Microsoft Internet Control to do this; however, the user must