VISUAL  BASIC

 

 

HOW  TO  START  VISUAL  BASIC ?

1.      Click ‘Start’ Program Files. . .From next menu  click ‘Microsoft Visual Studio 6.0’ >.

From next menu click ‘Microsoft Visual Basic 6.0’.

2.      Visual Basic 6 will appear and will ask you to choice the form. Select Standard EXE’ and

Click Open.

3.      The standard blank form will appear. Now, you have to work on this form. The screen will

be looked like as below.     

 

                        Newly opened Form.

 

4.      Left side of the screen you can find the ‘General’ Tools Bar. There are tools like (a) Pointer (b) Picture

Box © Label (d) Text Box  (e) Frame (f) Command Button (g) Check Box (h) Option Button (i) Combo Box  (j) List Box  (k) Hscroll Bar (l)  Vscroll Bar  (m)  Timer  (n)  Drive List Box  (o)  Dir List Box

(p) File List Box  (q) Shape  ®  Line  (s)  Image  (t)  Data  (u)  OLE .

 

                               You can find more and more Tools from . . . .

                              HOW TO FIND OUT MORE TOOLS ?

5.      Click on pull down menu ‘Project’ from this menu click ‘Components’. From it’s next screen click

‘Controls’. A list of controls or tools will be displayed, from this list choice and click the check

 boxes of the items which you need and click ‘OK’. The items have been chosen by you will

display in the ‘Tool Bar’.

 

WORK ON THE FORM

      Here I am telling you about only your training project. Visual Basic is so large I can’t express

It briefly because it will take minimum 6 months time. So I suggest you to learn it your-self. It is

Very interesting software like magic.                         

 

            The picture above is the designing screen.

 

HOW  TO  DESIGN  THE  FORM  ?

            The short descriptions have been given to design this simple form below of this Form.

 

Line Callout 1: Data 1

                                    This is a sample form. Study this form carefully. Details below :-

 

6.      Now see the Form above.

(a)  Click on the ‘Data’ in tool box (left on the screen), data is selected. Now click and drag the

       the mouse pointer on the form (where you want to paste it), Data control will be pasted on

       the form. Before setting it’s property, just create a ‘DSN’ (Data Source Name).

HOW TO CREATE A DSN ?

(i)                  Click on window’s ‘Start’ then click ‘Control Panel’.

Note : - If you are working with Windows 98 then Double click on “ODBC Data Source[32 bits]

            If Windows 2000 then click ‘Control Panel’ on the next screen double click “Administrative

            Tools” and then on next screen click “Data Source(ODBC)”.

(ii)                Next screen (ODBC Data Source Administrator) screen. Click on menu ‘User DSN’ then click

On ‘Add’ button, from next screen choose ‘Microsoft ODBC for Oracle’ and click ‘Finish’

Button, it will display another screen. Here . . . . .

 


Data Source Name  :                                          Or as you like  

 

Oracle Data

 
Description              :                                          Or you can type as you want

 

scott

 
User Name              :                                          User name scott

 

Bhel

 
Server                      :                                         Server name (your server)

 

 

Then click ‘OK’ button. Your DSN name “XYZ” created.

 

7.      Click on ‘Data1’ (Data Control), the item will be selected. Now press ‘F4’ key or click

On ‘Properties Window’ Icon on second line from top. Generally right side of the screen

Property window will appear.

Data1

 
                        SET  IT’S  PROPERTY :

                        (a)   (Name) :                                             It is default. You can set any name.            

           

Data1

 
                        (b)  Caption :                                              You can set any name.                   

 

ODBC;DSN=XYZ;UID=SCOTT;PWD=TIGER;SERVER=bhel; 

 
                        ©   Connect :                                                   

 

1 – Use ODBC

 
                        (d)   Default Type :                                          

 

1 – Dynaset 

 
                        (e)  RecordSet Type :                                      

 

Abc_trng

 
                        (f)   Record Source :                                              Table name here

 

(g)     

False 

 
Visible  :                                                   

 

8.      From Tool Bar select ‘A’ or Label, drag it on the form, on top for headings.

Label1

 
PROPERTIES :

(a)    (Name) :                                           It is default. You can set ‘L1’ or any name.

 

STUDENT’S PROJECT

 
                        (b)   Caption :                                           Type as you like.

 

MS Sans Serif              . . . .

 
                        ©    Font  :                                               Click here to set Fonts.

 

9.      FORM’S  PROPERTIES :

Form1 

 
(a)  (Name)  :                                           It is default name. Replace it with a name.

 

(b)  You can set Back Color or Fore Color etc.

 


©    Start Up Position :                                            Click for expanding.

 

(d)     

True   

 
Visible  :                                                   

 

(e)      

2 – Maximized  

 
Window State  :                                                   

 

10.  Click on Tool Bar, drag a Label on the Form.

L2  

 
SET  PROPERTIES :

(a)   (Name)  :                                          Or any name

 

Roll_No. :                               

 
(b)  Caption   :                                           Field Name

 

©    Font       : set font’s size.

 

11.  Take a TextBox  from ToolBar , Drag it on the Form (just right to L2).

 SET  PROPERTIES :

 

t1 

 
(a)   (Name)  :                                          Or any name

 

Roll_No 

 
(b)   DataField :                                           Click on down arrow and select field.

 

Data1 

 
(c )   DataSource :                                            Click on down arrow and select

 

 

 
(d)    Text   :                                                     keep it blank

 

12.  Through this method create other Labels and TextBoxes for other fields up to last field.

13.  Click on ToolsBar and drag a horizontal line on the form.

14.  Click on ToolsBar and take a Button and drag it on the form, just below the horizontal line.

 cmdInsert

 
SET  PROPERTIES :

(a)    (Name)   :                                           Or any name

 

(b)     

 Insert

 
Caption  :                                             

 

MS Sans Serif               . . .    

 
(c )   Font  :                                                Click here and set font’s size.

 

(c)      

 True

 
Visible  :                                           

 

15.  Through this way . . . . create  other buttons on the form  like . . . .

‘Save’ ,  ‘Modify’ ,  ‘Delete’ ,  ‘First’ ,  ‘Previous’ , ‘Next’ , ‘Last’ , ‘Refresh’ , ‘Exit’

and ‘Find’ .           

 

Connect Next  Page                                        Back

                 

                             

                             

                                                                                         

Hosted by www.Geocities.ws

1