Chapter 8. Managing Program Tasks with Procedures

function OpenWin(url, w, h) { if(!w) w = 400; if(!h) h = 300; window.open(url, "_new", "width=" + w + ",height=" + h + ",menubar=no,toobar=no,scrollbars=yes", true); } function Print() { window.focus(); if(window.print) { window.print(); window.setTimeout('window.close();',5000); } }
Team-Fly    

Special Edition Using Microsoft® Visual Basic® .NET
By Brian Siler, Jeff Spotts
Table of Contents
Part II:  Visual Basic Programming Fundamentals


In this chapter

Procedures Defined

Working with Sub Procedures

Working with Function Procedures

Reusing Functions and Procedures

In the preceding two chapters, you began to learn about writing code to make your programs accomplish various tasks. You saw how you can manipulate data and how control statements allow you to execute repetitive tasks and to execute statements selectively. However, creating a good, maintainable program involves more planning than just writing code.

One of the tasks you should learn to do is to create reusable pieces of code and reusable program pieces so that you are not constantly reinventing the wheel (or the program, in this case). Another important skill is the ability to manage those various pieces of code effectively. This chapter deals with both of these aspects of project management. First, you learn how you can use procedures to eliminate repetitive code in your programs. Then you learn how those procedures and other program components are added to your project.


    Team-Fly    
    Top
     



    Special Edition Using Visual Basic. NET
    Special Edition Using Visual Basic.NET
    ISBN: 078972572X
    EAN: 2147483647
    Year: 2001
    Pages: 198

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net