Microsoft Visual Basic 2010 Step by Step eBook
Chapter 9 Trapping Errors by Using Structured Error Handling 233 Writing a Disc Drive Error Handler The problem with the Disc Dr ...
234 Part II Programming Fundamentals Test the error handler Remove the CD or DVD from drive D, and then click the Start Debuggi ...
Chapter 9 Trapping Errors by Using Structured Error Handling 235 Use Finally to display a message box Display the Button1_Click ...
236 Part II Programming Fundamentals More Complex Try Catch Error Handlers As your programs become more sophisticated, you might ...
Chapter 9 Trapping Errors by Using Structured Error Handling 237 Exception Description IOException Occurs when there is an input ...
238 Part II Programming Fundamentals Catch ex As System.IO.FileNotFoundException 'if File Not Found error MsgBox("Check pathname ...
Chapter 9 Trapping Errors by Using Structured Error Handling 239 Run the program again, and then click the Check Drive button. ...
240 Part II Programming Fundamentals Retries variable at the top of the form’s program code so that it has scope throughout all ...
Chapter 9 Trapping Errors by Using Structured Error Handling 241 Click the Check Drive button. The error handler displays the ...
242 Part II Programming Fundamentals The error handler has responded to the disc drive problem by allowing the user a few tries ...
Chapter 9 Trapping Errors by Using Structured Error Handling 243 System.Drawing.Bitmap.FromFile("d:\fileopen.bmp") Else MsgBox(" ...
244 Part II Programming Fundamentals Using the Exit Try syntax, you can jump completely out of the current Try or Catch code blo ...
Chapter 9 Trapping Errors by Using Structured Error Handling 245 To Do this Test for specific error conditions in an event handl ...
...
247 Chapter 10 Creating Modules and Procedures After completing this chapter, you will be able to: n Employ structured programmi ...
248 Part II Programming Fundamentals To share variables and procedures among all the forms and event procedures in a project, yo ...
Chapter 10 Creating Modules and Procedures 249 Click the Add button. Visual Basic adds Module1 to your project. The module app ...
250 Part II Programming Fundamentals The Method Name list box indicates that the general declarations section of the module is o ...
Chapter 10 Creating Modules and Procedures 251 Return the Properties window and Solution Explorer to their regular docked posit ...
252 Part II Programming Fundamentals You don’t need to keep this project on your hard disk; it was only for testing purposes. To ...
«
9
10
11
12
13
14
15
16
17
18
»
Free download pdf