Visual Basic 6.0 Practical Exercises Pdf Instant
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 .
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).
Input N. Calculate and display sum = 1+2+…+N using a For loop.
Search for a name in the file and display the matching phone number. visual basic 6.0 practical exercises pdf
Fill an array with numbers 1–5. Display original, then display reversed order.
Read contacts.txt line by line and display in a ListBox.
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”. Create a recursive function to compute factorial
Ask for password. Max 3 attempts using Do While . If wrong after 3 attempts, disable the login button.
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.
Write two procedures that modify a variable – one using ByVal , one using ByRef . Show the difference. Write to Text File Take user input (Name,
9 CommandButtons in a grid. Alternate X and O. Check for win or draw.
Prompt for ID, find the record, and delete it. Exercise Set 8: Mini Projects 29. Digital Clock Use a Timer control (Interval=1000). Display current time in a Label: Format(Now, "hh:mm:ss AM/PM") .
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.