Page 127 - Open Soource Technologies 304.indd
P. 127

Kumar Vishal, Lovely Professional University            Unit 6: VB Control Structure





                                     Unit 6: VB Control Structure





                  CONTENTS

                  Objectives
                  Introduction
                  6.1 Structure
                  6.2 If-else Blocks
                     6.2.1 If Block
                     6.2.2  Elself Clauses
                  6.3 Do While Loops
                  6.4 While-Wend
                  6.5 For... Next Loops
                     6.5.1 Declaration of Control Variables
                     6.5.2  Nested For... Next Loops
                  6.6 Select Case Blocks
                  6.7 Summary
                  6.8 Keywords
                  6.9 Self Assessment Questions
                  6.10 Review Questions
                  6.11 Further Readings



               Objectives

               After studying this unit, you will be able to:
                  • Understand the structure of VB control and if else statement
                  • Discuss about the do while loops and next loops
                  • Explain about the case blocks.

               Introduction

               We have seen many examples of the usefulness of subscripted variables. They are essential for
               writing concise solutions to many programming problems. Because of the utility that subscripts
               provide, Visual Basic also provides for array of labels, text boxes, and buttons. Since labels, text
               boxes, and buttons are referred to generically in Visual Basic as control, array of these objects
               (or of any other control ) are called.




                                      LOVELY PROFESSIONAL UNIVERSITY                        121
   122   123   124   125   126   127   128   129   130   131   132