The Latest

DevX

Maintain Username and Password

Due to a minor bug, the Internet Transfer Control cannot use the username and password properties if they are set before the URL property. Because of this, you should always

DevX

Move a Form Without a Title Bar

Enter this code in a BAS module to let users move a window without a title bar: Declare Function ReleaseCapture Lib “user32” () As LongDeclare Function SendMessage Lib “user32” _

DevX

Avoid Implicit int Declarations

The default type for missing declarations like the following is int: const k =0; //’int’ type deduced; deprecatedstatic j =5; //ditto Though still supported by the C++ standard, this convention

DevX

Creating Objects

Question: I am having problems creating one particular ActiveX object using ASP. Previously I used WinCGI, and could create the desired object without any trouble. Trying to create the same

DevX

Start Menu

Question: When I start my PC, the first thing on the screen (after the virus scan)is Internet Explorer. Then I get a navagation cancelled box. How do I stop IE

DevX

Configuring a CD-ROM

Question: I have formatted my machine, which does not have any operating system. I used DOS 6.22 to boot the system and was planning to install Win 95. But my

DevX

Passing Arrays

Question: Can you pass an array directly into a cookie file, or do you have to convert it to a string first? If you have to convert it to a

DevX

Copy to Clipboard

Question: I want to copy some text in an HTML page to the clipboard when a button is clicked. Is there a method to do this in an onClick event?

DevX

Network Protocols — NetBeui

Question: What would happen if I removed the basic NetBeui protocol on an NT network and enabled TCP/IP as the lone and default one? Is that advisable? Answer: As with

DevX

Logging in to WinNT4.0 Svr

Question: Some of my users cannot logon to a new WinNT 4.0 server with the standard account I have created for them. Some users get the logon dialog box that

DevX

Inserting Text at Cursor Position

Question: How can I insert text in a textarea at the current cursor position ? I am able to insert it at the end, for example: textarea.value = textarea.value +

DevX

Creating Directories

Question: Is there any way to create a directory from within a PowerBuilder application without using the RUN command? Or is there a way to get the RUN command to

DevX

NT 4.0 Resource Kit

Question: I have been told that the NT 4.0 Resource Kit has a tool to turn an executable, such as one created in VB5, into a service running on NT

DevX

Streaming Media Bitrates

Question: Do you know of any way to find out the connection speed of a site’s visitor and then stream videos at the appropriate bitrate? I’m thinking specifically of RealPlayer.

DevX

Set Printer Margins

You can use the Printer’s scale properties to set margins. Set the properties so the position (0, 0) is mapped to where you want the margins. This code makes the

DevX

Make a Form Stay on Top

You can make a form always remain above others, even when it does not have focus. Use this code in a BAS module: #If Win16 Then Declare Sub SetWindowPos Lib

DevX

Perform One-Time Initialization

You can use static variables to perform one-time initialization: Private Sub GetValue()Static initialized As Boolean If Not initialized Then ‘ Perform one-time initialization. : initialized = True End If ‘

DevX

Use Explicit Object Types for Speed

It is much faster to use explicit object data types instead of generic ones. In this test that simply sets an object’s public variable, the generic object takes more than

DevX

Create Global Properties

You can create property procedures in a BAS module. The rest of your program treats the “property” like any other variable, but the property procedures can perform error checking and

DevX

Error ‘ASP 0115’

If you are developing in Visual Basic for Active Server Pages (ASP), there are two likely causes of an error ‘ASP 0115’. The VB5 setup wizard puts a number of

DevX

Hidden IP Address

One of the easiest ways to grab an IP address is to use request.servervariables(“REMOTE_ADDR”) and then store the value as a hidden field in your form. When the user submits

DevX

Creating Instance of InetAddress

InetAddress objects can be instantiated only by doing a hostname or address lookup by calling any one of the static lookup methods in the InetAddress. For example, to create an

DevX

Re-Throwing an Exception

An exception is thrown to indicate an abnormal state. The first handle to catch the exception can try to fix the problem. Should it fail to do that, or in

DevX

Returning Objects by Value

For efficiency reasons, large objects should usually be passed to or returned from a function by reference or by their address (using a pointer). There are, however, a few circumstances

DevX

Prefer Private Data Members to Protected Ones

Data members of a class are usually a part of its implementation rather than its interface. They may be replaced when the internal implementation of the class is to be