Visual Basic 6: Using Microsoft DataGrid Control 6.0

DataGrid control is   which is not  available by default in Tool box of Vb. You can add it from by Selecting menu Project ->Component. From there select Microsoft DataGrid Control 6.0 and check check box to add it to Tool box. Before exiting from there, select the Microsoft ADO data control to access the database. Now you can drag and drop both conreol as other normal controls.  To create a Database one can use MS Access. After creating the DB use ADO control to connect the DB with the VB application

Combobox and click event in Visual Basic 6.0

Using VisualBasic I am creating a small application program. In this app contains a Text box, a combo-box and a list box. The app accept a number, through text-box, as a limit and by choosing an item (Factorial,Fibonacci,Prime) from the combo-box generate a list in the list box. For example if you feed 5 then choosing factorial from combo box will generate a series in the list box.
Normally you do insert code into the combo-box control by double clicking on it . It will by default shows an event-procedure like Sub Combo1_Change(). This means that by default combo-box generate an change event. But this change event is not going to show the result in list box. To show the result of selected item into the list box just change the event _Change to _Click which usually do by selecting the combo on the top of the code window

Sub Combo1_Change()
'code goes here
end sub
to
Sub Comb1_Click()
'code goes here
End sub.

Example:

This application has text box, combobox and a list box. Combo box contain three options Facorial Fibonacci and Prime. In the text box user can enter the limit up to which the user want to find, the choice from the combo box.





 Design



Click to Download the code