www.4cnotes.info

visit xdeem.com also

4cnotes.info

4cnotes.info for Free College Notes, Placement trainng

visit www.xdeem.com also

Thanks for ure visit

Thanks for visiting our site

visit xdeem.com also.

4cnotes.info

Thank u

Showing posts with label Visual Basic. Show all posts
Showing posts with label Visual Basic. Show all posts

ONLINE QUIZ in VB



AIM:
           Create on Online Quiz in Visual Basic 6.0
PROCEDURE:
Step 1: create a standard exe project.
Step 2: Design command buttons, textboxes, labels and option buttons. The option          button is control Array.
Step 3: On the form load event the timer is enabled and only the Question or One frame should be visible to the student.
Step 4: On the timer event the time should be decremented by one and also display the remaining Time in the textbox. When the time became Zero the timer is disables.
Step 5: On the Click event of the each frame the next frame should be visible and the current frame should be Invisible. If the answer is correct then increment the score
Step 6: On the click of end command button end the program.




SOURCE CODE:
Dim mark  As Integer
Private Sub Command1_Click()
Me.Timer1.Enabled = True
End Sub

Private Sub Command2_Click()
Form1.Visible = False
Form2.Show
Form2.Command2.Caption = "END"
Form2.Command1.Visible = False
Form2.Frame1.Visible = True
Form2.Text4.Text = Val(Text1.Text)
End Sub

Private Sub Form_Load()
Me.Timer1.Enabled = True
Text1.Text = "0"
End Sub

Private Sub OP3_Click(Index As Integer)
If OP3(1).Value = True Then
mark = mark + 1
Text1.Text = mark
MsgBox ("CONGRATS!"), vbInformation
Else
MsgBox ("ANSWER IS WRONG"), vbCritical
End If
Me.Frame2.Visible = False
Frame3.Visible = True
Timer2.Enabled = False
Timer3.Enabled = True
Text2.Text = 10
End Sub

Private Sub Option3_Click(Index As Integer)
If Option3(0).Value = True Then
mark = mark + 1
Text1.Text = mark
MsgBox ("CONGRATS!"), vbInformation
Else
MsgBox ("ANSWER IS WRONG"), vbCritical
End If
Timer3.Enabled = False
Form1.Visible = False
Form2.Show
Form2.Command2.Visible = False
Form2.Command2.Caption = "END"
Form2.Frame1.Visible = True
Form2.Text4.Text = Val(Text1.Text)
End Sub

Private Sub Option4_Click(Index As Integer)
If Option4(1).Value = True Then
mark = mark + 1
Text1.Text = mark
MsgBox ("CONGRATS!"), vbInformation
Else
MsgBox ("ANSWER IS WRONG"), vbCritical
End If
Frame1.Visible = False
Frame2.Visible = True
Text2.Text = 10
Timer1.Enabled = False
Timer2.Enabled = True
End Sub

Private Sub Timer1_Timer()
If Text2.Text > 0 Then
Text2.Text = Val(Text2.Text) - 1
Else
Text2.Text = 10
Timer1.Enabled = False
Timer2.Enabled = True
MsgBox ("OVERTIME"), vbInformation
Me.Frame1.Visible = False
Me.Frame2.Visible = True
End If
End Sub

Private Sub Timer3_Timer()
If Text2.Text > 0 Then
Text2.Text = Val(Text2.Text) - 1
Else
Text2.Text = "END"
Timer3.Enabled = False
MsgBox ("OVERTIME"), vbCritical
Form1.Visible = False
Form2.Show
Form2.Command2.Visible = False
Form2.Command2.Caption = "END"
Form2.Frame1.Visible = True
Form2.Text4.Text = Val(Text1.Text)
End If
End Sub

Private Sub Timer2_Timer()
If Text2.Text > 0 Then
Text2.Text = Val(Text2.Text) - 1
Else
Text2.Text = 10
Timer2.Enabled = False
Timer3.Enabled = True
Form2.Command2.Caption = "END"
MsgBox ("OVERTIME"), vbInformation
Me.Frame2.Visible = False
Me.Frame3.Visible = True
End If
End Sub
Private Sub Command1_Click()
Form2.Visible = False
Form1.Show
End Sub



TIMER CONTROL



AIM:
To generate the count using Timer control
Procedure:
Step1: Create a standard Exe project
Step2: Design the form with label and command button for each purpose needed
Step3: On the click event the start button the timer should be enabling and incrementing count should be displayed
Step4: On the click event on the stop button the timer should be stop
Step5: On click event of the exit button and end the program







SOURCE CODE
Dim A As Integer

Private Sub Command1_Click()
Timer1.Enabled = True
End Sub

Private Sub Command2_Click()
Timer1.Enabled = False
End Sub

Private Sub Command3_Click()
End
End Sub


Private Sub Timer1_Timer()
 A = A + 1
Print "Count"; A
End Sub




EMPLOYEE DETAILS



AIM:
      To display the personal details for an employee using ADO control.
PROCEDURE:
Step 1 :  Create a standard exe project.
Step 2 :  Click on adding options from the menu bar.
Step 3 :  Click visual manager→ click file → click new → Microsoft access version
               7.4Mdb.
Step 4 :  Enter the database name and save it in the desired location.
Step 5 :  Right click the properties in the database window and click new table, enter
               table name and add the fields.
Step 6 :  Then go to form and place an necessary label, text box and command button
               Place an ADO control components → Microsoft ADO control 6.1.
Step 7 :  Right a corresponding codes for all the buttons and run the program.          

PAYROLL DETAILS



AIM:
            To  calculate the payroll of an employee using Data control.
PROCEDURE:

Step 1: Create a standard exe project.
Step 2: Click adding options from menu bar.
Step 3: Click visual managerà click fileà newà Microsoft access version 7.0Mdb.
Step 4: Enter the database and save it in desired location.
Step 5: Right click the prosperities in database window and click new table.
Step 6:  Enter table name and add the fields. Now click the build the table. Then                          go to the form and place the necessary labels text boxes and command                                    buttons.
Step 7: Place one data control in the form.
Step 8: Write the corresponding code for all the button and run the program.


STACK OPERATION USING CLASS MODULE



 AIM
          To perform stack operation using class module.

PROCEDURE

       Step 1: Create standard exe project.
           
       Step 2: Design the form with command buttons for each purpose
                    needed
            
       Step 3: Add a new class module to the project and write all the
                    functions, push, pop and display and declare it as public
        
       Step4: In the form code the functions from the class module are called
                    using the class variable

       Step 5: On the click event of the book  button the push function of the
                   class module is called.thus the user can enter an item  and its
                   count is displayed.this process is continued until the stack
                   becomes full.

      Step 6: On the click event of the delete button the pop function of the
                  class module is called.here the item will be deleted from the
                   tack until the stack becomes empty.

      Step 7: On the click event of  the exit button end the program.

MENU EDITOR



AIM
          To create a menu using menu editor in Visual Basic 6.0.
PROCEDURE:
Step 1: Start the program
Step 2: Open a new standard exe project in VB and set its MDI child property 
                       To true to the form.
Step 3: Add a new MDI form.
Step 4: From the project menu add the various controls like Microsoft   
                            Rich textbox 6.0, Microsoft common dialog control, and Microsoft
                            Windows common controls 6.0.
 Step 5: In the form1 place the Rich textbox control.
 Step 6: In the MDI form, place a menu using menu editor option form.
                           Tools menu, add also toolbar control and change its properties.
 Step 7: Place Image list control and common dialog control and change its 
                            Properties, by adding images in toolbar.
 Step 8: Write the corresponding code for each click event of menus and
                         Buttons in the toolbar, Run the MDI form and execute the program.

GRAPHIC EDITOR


AIM:
            To create the Graphic editor program by using Visual basic 6.0.

PROCEDURE: 

            Step 1:  Open the Microsoft Visual basic 6.0.
            Step 2:  To opening New project.
Step 3:  Declared the integer and string variables.
Step 4:   Place the required control to be used in the form they are Picture            box, Command button and scroll bar.
            Step 5:  Type the coding to perform the Graphic editor program.
            Step 6:  To run the program and by using command button to Draw the                             pictures in the Picture box.
            Step 7:  Save the form and project.