Posts

Showing posts with the label vb

Database programming in VB for begginers

Image
The built-in add-in tool ,Visual Data Manager, available in Visual Basic is used for creating database. Visual Data Manager can be used to create tables, add new data as well as edit data. Besides that, it can be used to modify table structure. To create the database follow the steps Step-1  To activate or start  Visual Data Manager, select Add-In menu of VB project window from there select the first item, V isual Data Manager.On clicking the Visual Data Manager a window titled VisData will pop up. From the menu of  this window, click File and choose New to create a new database.(Steps:- New->Microsoft-Access->Version7.0MDB ) See the figures below:

Combobox and click event in Visual Basic 6.0

Image
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...

Creating Code modules in Visual Basic

Image
Three VisualBasic(VB) Modules are: Form module Standard module Class module In Visual Basic, a module is a part or a piece of code which, used to, perform some specific task . Modules is a  separate code file. In VB, for application development programmer normally insert code for application by double clicking on controls in desing mode. This action transfer the programmer from design window mode to code-window. The code usually contains declarations of variables, constants, types, procedures, functions event procedures etc etc. Visual Basic usually handles this as module for the form. By using VB module one can create common code for an entire application. Modules are helpful when programmer developing a large application which possibly involve the usage of same code at different part such as procedure,function. For instance a larger