Visual Basic 6.0 Practical Exercises Pdf -
Use text boxes and a button to insert a new record into the Access database using Recordset.AddNew .
Write a subroutine ClearTextBoxes() that loops through all controls on the form and clears any TextBox .
Use three OptionButtons (Red, Yellow, Green). Based on selection, display a message: “Stop”, “Ready”, or “Go”. visual basic 6.0 practical exercises pdf
Ask for password. Max 3 attempts using Do While . If wrong after 3 attempts, disable the login button.
Input N. Calculate and display sum = 1+2+…+N using a For loop. Use text boxes and a button to insert
9 CommandButtons in a grid. Alternate X and O. Check for win or draw.
Ask the user how many numbers they want to enter. ReDim an array accordingly. Input values and show their sum. Exercise Set 5: Procedures & Functions 17. Function: Celsius to Fahrenheit Create a function CtoF(C) that returns Fahrenheit. Call it from a button click. If wrong after 3 attempts, disable the login button
Write two procedures that modify a variable – one using ByVal , one using ByRef . Show the difference.
Store roll number, name, and marks. Save to file. Provide option to load and display all. Exercise Set 7: Database (ADODC / Data Control) 25. Connect to Access DB Create a database students.mdb with table Students (ID, Name, Grade). Use ADODC control to bind to text boxes. Add navigation buttons (Next, Previous).
Create two text boxes for numbers, four buttons (+, -, *, /), and a label for the result. Perform the operation and show the result. Handle division by zero with a message box.