The Latest

DevX - Software Development Resource

Static Variables

Static variables (not to be confused with static class members) have the qualities of both global and local variables: they are initialized by default to binary zeroes (unless explicitly initialized

DevX - Software Development Resource

Data Sources

Question: Do I have to duplicate DSNs on the development PC and the Web server for Visual InterDev to work, or can I use the Data Source on the Web

DevX - Software Development Resource

ASP error ‘0115’

Question: I have MDAC 1.5 on my Windows 95 box running PWS 4.0. I get ASP ‘0115’ when trying to run any of the ASP scripts, even the samples downloaded

DevX - Software Development Resource

How to invoke Word from ASP

Question: I have a successful ASP application that returns data to an IE4 browser and requests that the browser display the data as an Excel spreadsheet. When I save the

DevX - Software Development Resource

wince_palmpc

Question: Microsoft currently has a VB5 extension to allow programming of the WinCE handheld PCs, but not for the Palm PCs. Is Microsoft planning a version of WinCE VB for

DevX - Software Development Resource

WinCE / SystemTray

Question: My question involves SystemTray controls for WinCE 2.0. I am familiar with the ActiveX controls that can use the SystemTray in Win95. However, I am not sure how to

DevX - Software Development Resource

Menus & Toolbars for Frame and Sheets

Question: I would like to build two toolbars on the screen. The first is one that goes along the top of the screen that is associated with the menu in

DevX - Software Development Resource

Formatting output

Question: I’m trying to format the output of the select query that I have done. The fields in the database are too large to parse easily, so they need to

DevX - Software Development Resource

Royalty fee

Question: I’d like to know if there’s any royaltyto be paid when I distribute the applications I did in PowerBuilder. Answer: No, you can distribute PB client applications royalty-free. You

DevX - Software Development Resource

Color Dialog (Common Dialog)

Question: How can I use the CHOOSECOLOR WIN32 API with Powerbuilder? Answer: Create a custom user object and declare the following local structure:long lstructsizeulong hwndownerulong hinstancelong rgbresultblob lpcustcolorslong flagslong lcustdatalong

DevX - Software Development Resource

Identity Primary Key column

Question: I have a recurring problem inserting rows into tables that have a column that is “int IDENTITY PRIMARY KEY.” At some point in the life of the table, I

DevX - Software Development Resource

Backup

Question: I am trying to back up a database to a disk backup device over a network. When I attempt my backup, I encounter an error 5 ? Access denied.

DevX - Software Development Resource

Automating DBCC checks

Question: I need to run DBCC checks on my databases every week, but I was advised not to use the databasewizards in MS SQL 6.5. Can DBCCs be setup to

DevX - Software Development Resource

A static class member

A class member declared static is a single instance of that member shared by all instances of this class (that’s why it is sometimes termed a class variable, as opposed

DevX - Software Development Resource

Placement new

Operator new allocates memory from the heap, on which an object is constructed. Standard C++ also supports placement new operator, which constructs an object on a pre-allocated buffer. This is

DevX - Software Development Resource

Namespace aliases

Choosing a short name for a namespace can eventually lead to a name clash. On the other hand, very long namespaces are not easy to use. For that purpose, namespace

DevX - Software Development Resource

Avoid using double underscore in your identifiers

Identifiers starting with __ (double underscore) are reserved for C/C++ implementations and standard libraries. Furthermore, C++ programs are transformed by the compiler (inline substitution, addition of this as an argument

DevX - Software Development Resource

Control Arrays are Collections

Most VB4 programmers know they can access a form’s control collection using a For Each loop. Many, however, are not aware that individual control arrays are actually collections. This knowledge

DevX - Software Development Resource

Support a Font the Printer Doesn’t

Often users print from applications that support a font the printer doesn’t. An error occurs if an application uses a statement such as Printer.Print SomethingToPrint following a Printer.FontName = FontName

DevX - Software Development Resource

Center Forms with Taskbar Visible

Just about every VB developer uses the Move (Screen.Width – Width) 2, (Screen.Height – Height) 2 method to center the forms on screen. However, when the user has the Windows

DevX - Software Development Resource

Set a Flag to True/False

When you want to set a flag to True or False, depending on the results of a comparison, you don’t need to use an If statement like this: If x

DevX - Software Development Resource

Navigating the Object Hierarchy

Question: I am trying to process a table and its rows and cells on an HTML page. I have given the Table, TR and TD elements IDs. I am trying

DevX - Software Development Resource

NT Workstation DualBoot with 95

Question: I have Windows 95 OSR 2 installed (FAT32). Should I be able to install NT Workstation/Server as a dual boot option? Whenever I run setup.exe I get a message

DevX - Software Development Resource

String literals are const

According to the C++ standard, the following line is illegal: char *s = “hello world”; //illegal Though still supported by many compilers, it’s deprecated and should be avoided. The reason

DevX - Software Development Resource

A general base class – is it such a good idea?

In many frameworks and software projects, all classes are enforced to be descendants of one common generic class, usually named Object. This design policy prevails in other OO language such