jagomart
digital resources
picture1_Tutorial Pdf 190723 | Visual Basic Notes About Lesson B Tutorial 1


 123x       Filetype PDF       File size 0.16 MB       Source: www.chsd1.org


File: Tutorial Pdf 190723 | Visual Basic Notes About Lesson B Tutorial 1
writing visual basic coding tutorial 1 lesson b visual basic book actions such as clicking double clicking and scrolling are called events you use the code editor window to tell ...

icon picture PDF Filetype PDF | Posted on 03 Feb 2023 | 2 years ago
Partial capture of text on file.
   Writing Visual Basic  Coding (Tutorial 1 Lesson B Visual Basic Book) 
   Actions such as clicking, double-clicking, and scrolling are called EVENTS. 
   You use the Code Editor Window to tell and object (like a button) how to respond to an EVENT within the 
   Code Window in what’s called an EVENT PROCEDURE.   
   *You can jump to the Code Editor Window by right-clicking anywhere on the form (except the Title Bar) and 
   then select View Code from the context menu.  
   ** You can also click View on the menu bar, and then click Code; or you can press the F7 key on  
          your keyboard. 
                                    
   Above you can see that the code begins with Public Class frmCopyright and ends with End Class this is known 
   as a Class Definition.  A Class Definition is simply a block of code that specifies (or defines) the attributes and 
   behaviors of an object.   
                                       
   The above image is the Code Window for the Mech Form.  Notice the Inherits System.Windows.Forms.Form 
   instruction included in the Mech Form class definition.  The Mech Form (the derived class) inherits the 
   attributes and behaviors for the Form class (the Base Class), which is provided by Visual Basic 2013 and 
   defined in the Systems.Windows.Forms namespace.  In other words, rather than you having to write all the 
   code necessary to create a Windows form object, Visual Basic provides the basic code in the Form class. 
                                          
   The Code Editor Window contains a Class Name list box and a Method Name list box.  The Class Name list box 
   list the names of the objects included in the user interface.  The Method Name list box lists the events to 
   which the selected object is capable of responding.  You use the Class Name and Method Name list boxes to 
   select the object and event that you want to code.   
   To help you follow the rules of the Visual Basic programming language, called syntax, the Code editor provides 
   you with a code template for every event procedure. The first line in the code template is the Procedure 
   header and the last line is called the procedure footer. 
   In the Procedure header:   
   Private Sub cmdExit_Click(sender As Object, e As EventArgs) 
   Sub – is an abbreviation for the term sub procedure, which in programming 
   terminology refers to a block of code that performs a specific task. 
   Private – indicates that the procedure can only be used within the class in which 
   it is defined, in this case only within the frmCopyright class. 
   cmdExit – name of the object  
   _ - used as a separator between the object name and the event name 
   Click – name of the event. 
   (sender As Object, e As EventArgs) – The items within the parenthesis are called 
   Parameters and represent information that are passed to the procedure when it is 
   invoked (executed).  
   To end an application, you invoke the Me.Close() method.  A method is simply a 
   predefined Visual Basic procedure that you can call (invoke) when needed.  PLEASE 
   NOTE:  The parenthesis are required when calling any Visual Basic method, however 
   depending on the method the parenthesis may or may not be empty. 
The words contained in this file might help you see if this file matches what you are looking for:

...Writing visual basic coding tutorial lesson b book actions such as clicking double and scrolling are called events you use the code editor window to tell object like a button how respond an event within in what s procedure can jump by right anywhere on form except title bar then select view from context menu also click or press f key your keyboard above see that begins with public class frmcopyright ends end this is known definition simply block of specifies defines attributes behaviors image for mech notice inherits system windows forms instruction included derived base which provided defined systems namespace other words rather than having write all necessary create provides contains name list box method names objects user interface lists selected capable responding boxes want help follow rules programming language syntax template every first line header last footer private sub cmdexit sender e eventargs abbreviation term terminology refers performs specific task indicates only be us...

no reviews yet
Please Login to review.