Archive for the ‘VB 6.0’ Category

How to Add and Clear Recent Documents History in VB 6

Q. Write a VB6 program to add files to Recent Documents list and also create a code for clearing recent documents list as well. Recent Documents is the history of previously opened files in Windows. These are list of shortcuts to access programs. These shortcuts are stored in “Recent” folder in a computer system. The [...]

How to Select All Text from TextBox in VB 6 using Ctrl+A

Q.: Write a program in Visual Basic 6.0 which can select all text from textbox using Ctrl+A (Control A) keys. In VB 6.0, it is not possible to select all text from textbox directly using control keys. But we can do it easily using following featured code which helps to overcome this problem. The following [...]

How to Add Tab in Toolbox in Visual Basic 6.0

Toolbox Tab in VB 6.0: In Visual Basic 6.0, you can add custom tab to the toolbox where you can add controls which you often use on forms. This is one of the most useful facility available in VB 6.0. 1. Add Tab… : Open Microsoft Visual Basic 6.0. Right click on Toolbox. Add Tab… [...]

Connecting MS-Access 2007 Database with Password Security in VB6

Q. Create a form in VB 6.0 which has MS-Access 2007 database with password enabled security as a back end database and perform operations like Save, Modify(Edit), Delete. In major database applications, security matters for unauthorized direct access to database. We can secure database by setting database password in MS-Access. It is strongly recommended to use database [...]

Connecting MS-Access 2007 Database in Visual Basic 6.0

Q. Create a form in VB 6.0 which has MS-Access 2007 as a back end database and perform operations like Save, Modify(Edit), Delete. Sometimes, we need to connect MS-Access 2007 database through VB 6.0 as well as we want to change database from MS-Access 2002, 2003 to MS-Access 2007. It is necessary to change connectionstring only. [...]

How to use Listview Control in VB 6.0 with columns with items

Write a program to use listview control in Visual Basic 6.0 and explain with example, properties, functions and features in it. Listview in VB 6.0: Listview control is one of the most important feature available in VB 6.0. It plays a vital role in creating applications with grid support. It is primarily used to display [...]

File Types Extensions used in Visual Basic 6.0

Those who are new to Visual Basic 6.0 Programming must know the various file types used in it. There are various files used in VB 6.0 each for different purpose. File Types in VB 6.0: .frm – Form File .vbp – Visual Basic Project File .bas – Visual Basic Module File .cls – Visual Basic [...]

Run-time error '58' : File already exists in Visual Basic

Sometimes, in Visual Basic 6.0 if you are working with files and folders then you may get an error like this, This is run-time error that can be occured due to following several reasons. Possible Reasons or Causes : The resultant file already exist on path which you have provided in a code.  Source file [...]

How to move Textbox Control in VB 6.0

Sometimes, we have to change the position of certain controls like Text, Command Button, ComboBox, ListBox, Line, CheckBox, Frame in Visual Basic 6.0. Using following simple source code we can do it very easily. Just we have to set to properties of control properly i.e. Top and Left. Source Code: Output: Download Now (.Zip File [...]