October 1, 1996

Using Rnd Function

Question: Is there any way I can have a % chance in random events. (say you click on a button and you have a 30% chance of it doing one thing, a 20% chance of doing another, and a 50%

Read More

Varying Length Dynamically

Question: I know VB insists on a _constant_ for the array subscript. Has anyone found a way around this? I would like to set an array length equal to the number of records in an Access 2.0 table. Answer: The

Read More

Putting Buttons on PictureBox

Question: My question is that I’m trying to put a command buttons in a picture box on MDI form (it’s a text editor). But it always keeps on givin’ me this error “Controls without the aligned property cannot be be

Read More

Putting a ProgressBar on a StatusBar

Question: Both the ProgressBar and the StatusBar appear to be welcome additions to the VB controls set. But, while I have had to create each of the various built-in StatusBar styles at least once in the past, I have never

Read More

Changing Database Structure

Question: I’m using VB 3.0 to work with databases in the Jet 2.0 format. I expect it will be necessary to add new fields to the database sometime in the future. Will I have to create a new database file

Read More

Editing Forms Directly

Question: I want to present screens of text in an application. I plan to use label controls and would like to cut and paste the text from my word processor rather than retype it into the caption field of the

Read More

Controlling Netscape

Question: I’m trying to write an application that loads URLs into the user’s web browser, but it’s based on the shell function and fires up a second Netscape window when the user submits the URL. How do I get VB

Read More

Calling a Form’s Subroutines

Question: How can I call another Form’s subroutine? Answer: Under VB3 you can’t call another form’s subroutine. If you need to do this, put the sub into a .BAS module. However, under VB4, you can make a public subroutine that

Read More

Setting Windows Wallpaper

Question: I am trying to use the API call SystemParametersInfo to change the Windows wallpaper. It works great in a Borland C program I wrote, but doesn’t work in VB. All that happens is that the wallpaper turns blue. Answer:

Read More
No more posts to show