Visual Basic 6.0 Practical Exercises Pdf 🎯 Full

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.

Ask for password. Max 3 attempts using Do While . If wrong after 3 attempts, disable the login button.

Create a recursive function to compute factorial. Input N, display result. Exercise Set 6: File Handling 21. Write to Text File Take user input (Name, Phone) from text boxes. Append to contacts.txt using Open , Write # , Close .

Display all even numbers between 1 and 50 in a ListBox using a loop. Exercise Set 4: Arrays & Lists 13. Student Average Allow entry of marks for 5 subjects into an array. Compute total and average. Display each subject mark and the average. visual basic 6.0 practical exercises pdf

Read contacts.txt line by line and display in a ListBox.

Input N. Calculate and display sum = 1+2+…+N using a For loop.

Hardcode an array of 10 names. Let the user type a name. Use a loop to find if it exists. Show “Found” or “Not Found”. Ask the user how many numbers they want to enter

Fill an array with numbers 1–5. Display original, then display reversed order.

Enter a number 1–7. Using Select Case , show the corresponding weekday name. Exercise Set 3: Loops (For, Do While, Do Until) 9. Multiplication Table Input a number from the user. Show its multiplication table from 1 to 10 in a ListBox.

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). Exercise Set 5: Procedures & Functions 17

Use three OptionButtons (Red, Yellow, Green). Based on selection, display a message: “Stop”, “Ready”, or “Go”.

Input a name, search the recordset, and display the grade.

Use text boxes and a button to insert a new record into the Access database using Recordset.AddNew .

Write two procedures that modify a variable – one using ByVal , one using ByRef . Show the difference.

Torna in cima