Exercises Pdf - Visual Basic 6.0 Practical
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.
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. 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 .
Fill an array with numbers 1–5. Display original, then display reversed order. visual basic 6.0 practical exercises pdf
Input a name, search the recordset, and display the grade.
Search for a name in the file and display the matching phone number.
Use text boxes and a button to insert a new record into the Access database using Recordset.AddNew . Create two text boxes for numbers, four buttons
Use a RichTextBox (or TextBox with MultiLine=True) and menu bar: File → New, Open, Save, Exit.
Write a subroutine ClearTextBoxes() that loops through all controls on the form and clears any TextBox .
Ask for password. Max 3 attempts using Do While . If wrong after 3 attempts, disable the login button. Hardcode an array of 10 names
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).
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") .