
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

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

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

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 ‘

If you want to convert an array into a sting, the join method is your best bet. This method takes one parameter and uses it as the separator between each

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

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

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

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

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

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

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

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

Derived classes can combine functionality of several base classes simultaneously, by means of multiple inheritance. Trying to achieve the same effect by using single inheritance can be very difficult, to

A class can be declared inside a function or a block. In such cases, it is not visible from anywhere else, and instances thereof can only be created within the

You can easily find out the browser type, version, and sometimes the operating system that your visitors are using by checking the userAgent and appVersion properties of the navigator object.

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

Question: I’ve heard that the MDI Frame status bar can be subdivided so that multiple messages can be sent there. The only two methods of manipulating the status bar that

Question: Can I use an animated GIF in my application? Answer: There is no simple way to use animated GIFs inside of PowerBuilder. However, there is a way that you

Question: How can I find out the user name at SQL prompt. Answer: In SQL Server, you can write select user_name() Related Posts Embarcadero Unveils Indoor/Outdoor Application Proximity SolutionIDC Predicts

Question: I have a popup window with tab control (four tabs). I need to specify at open time which tab page gets control. It always opens tab 1 no matter

Question: I need to enter up to 1,600 measured data points into a SQL database. Each point makes one record. Is there a way to enter all of these records

Question: How can I import a delimited text file into a SQL Sever table? Answer: Welcome to the world of BCP. Included with SQL Server, the Bulk Copy Program will

Question: How can you make your application “always on top,” just like the Windows clock application can? I use PB 4.0 and Windows 3.1. Answer: Use the SetPosition command to

Question: Instead of distributing a user object (and its functions) as a PBD, I want to distribute it asa DLL (build runtime library, machine code),and then access its functionality in

Question: I would like to know how to find information(books, online documentation) on using ActiveXcontrols in PowerBuilder. Answer: I find the best way to learn how to use a new

Question: When one is working with large amounts of data, what is the quickest way of displaying rows not found when comparing two tables, without doing the following: SELECT table1.field1

Question: Is there a way to display the text on two lines with a command button in PowerBuilder 5? We have already tried the ~n. Answer: There is no way

sing the Swing JTable class can quickly become a stickybusiness when you want to customize it to your specific needs. First you must become familiar with how the JTable class

n part one, I showed you how to create a basic SMTP e-mail system on an intranet. In this portion, you will use Active Server Pages code to read the

hat is a trigger? How does it work? When should one use them, and how does one debug them? Last, what are the enhancements that were made in SQL Server