March 16, 2000

Maximum Number of Objects on a Form

Question: Is there any way to get more than 255 objects on a VB form? Answer: No, there’s not a way to pass the limit of 255 objects per form. If you’re hitting that limit, you should probably look at breaking your form into multiple forms. In all the years

Using Format Function to Right Justify

Question: When using printer.print statements to send output directly to the printer, it used to be possible in QB PDS to use something like “printer.print format(number, “###,###.00”) to get right justification of numbers on successive lines. Now, although the MS documentation says that the “#” characters act as placeholders, they

Using Variables in SQL

Question: I have connected a form to the DB using an ADODC. I connect fine, I can read the DB if I put a literal in my sql: recordsource = select * from table1 where employeenum = 108 But, I want to use the value that is stored in the

Database Integration

Question: I am developing an application in VB6 that uses its own DB. I need to link my application’s DB with clients’ DBS or even ERP systems. Therefore, I need to exchange data between my application’s DB and clients’ DBS or ERP systems?which will probably be different from client to

Initializing Array of UDT’s

Question: Here’s some simple code in Test.bas: Public Type MY_RECORD Field1 as String Field1 as StringEnd Typein frmTest.frmGeneral DeclarationsPrivate mArrayOfRecords() as MY_RECORDForm_Load ‘this line of code BOMBS If IsEmpty(mArrayOfRecords) then ‘dimension it End IfEnd Sub OK, Why can’t I check if an array of user defined types has been initialized?

Copying Part of a String

Question: I have a little problem which I can’t solve. I will give the question with an example. I’m working with Excel. In a cell the string “100dpi.txt” is written. Is it possible to copy a part of this string “100dpi” to another cell? How should I do this? In

Checking If a File is in Use

Question: How can I check to see if a file is in use/open? Answer: An easy way to do this is to attempt to open the file for writing. If you get an error and have verified that the file exists, the file is most likely already open. You can

Manually Positioning Buttons in a Java Applet

You can use Java’s layout managers to maintain the relative position of objects in an applet without manually repositioning them as the applet’s size changes. However, you may occasionally want to stipulate absolute layout coordinates for objects such as buttons or other menu-related components. To do so, you must use

Where Should Template Definitions Appear?

Normally, you declare functions and classes in a .h file and place their definition in a separate .cpp file. With templates, this practice isn’t really useful because the compiler must see the actual definition of a template, not just the declaration, when it encounters a template instantiation. Therefore, it’s best

No more posts to show