Tip Bank

DevX - Software Development Resource

Using Multiple Groups of Option Buttons

Question: I need to place multiple option buttons on a form. I alsoneed to be able to have two buttons selected at all times.I can do this with multiple frame

DevX - Software Development Resource

Illegal SetFocus Call

Question: Sometimes when I call Text1.SetFocusit returns me an “Illegal function call” error. Any idea why? Answer: Normally, if the Form is not visible, you can’t call SetFocus to it.

DevX - Software Development Resource

Passing Parameters by Reference

Question: I have a function in a DLL that I want to call from VB program. The Dll function has few parameters. Some of them should be passed from vb

DevX - Software Development Resource

Adding Scrollbars

Question: How do I add scrollbars to a picture box control?i.e I want to be able to scroll through a picture box which containsmore than one screen of graphic and

DevX - Software Development Resource

Implementing a Toolbar

Question: I am using VB 3.0 professional edition. I would like toimplement cut/copy/paste on a toolbar. My form has multipletext boxes. If the user wants to paste to a field,

DevX - Software Development Resource

Selecting File from File List Box

Question: I put a drive box, a directory list box, and a file list box on the form, with the intention of being able to select an *.ico file from

DevX - Software Development Resource

Formatting a Disk

Question: How do I issue a disk format command from myVB code? Do I simply shell to DOS? Answer: That’s what I would recommend. Format is a .COM file, so

DevX - Software Development Resource

RecordCount Incorrect

Question: VB reports the wrong number of records from an Access database with the RecordCount property. The same query to dBase files reports the correct number of records. What is

DevX - Software Development Resource

Executing DOS Commands

Question: How can I run the following “SHELL” command in VB? It works fine in PowerBasic, but VB 3.0 doesn’t like it.SHELL “DIR *.BKP > FILES.LST”Any ideas? Answer: Try this:Shell