Tutorial 2

            Steps in Design

                        Plan the application (TOE chart Task,Object,Event)

                        Build the user interface

                        Code the application

                        Test and Debug the application

                        Assemble the documentation

            OOED in VB

                        Indenify the tasks the application needs to perform

                        Indentify the objectives to which you will assign those tasks   

                        Identify the events required to trigger an object into performing its assigned task

                        draw a sketch of the user interface

           

            Design Tips

                        Maintain a consistent margin of two or three dots from the edge of the window

                        position related controls on succeeding dots                                                                  Command  buttons

                                    sized relatively to each other   

                                    if centered on form                           

                                                same height and width may vary

                                    stacked in upper right or lower right

                                                same height and same width

            Fonts

                        default is 8 point MS San serif

                        use on or two point sizes

                        use san serif

                                    serif is a s light cross stroke that appears at the top or bttom of a                                                             character

                                    san serif - do not have the stroke

                        avoid italics and underlining(hard to read)

                       

            Colors

                        use black, white, gray

                        use colors for a good reason

                        use white, off-white, light gray for background

                        black for text

                        limits colors to three

 

 

            Properties

                        BackColor - objects Background color

                        BackStyle - determine if control is transparent or opaque

                                    default 1-Opaque

                                    opaque - backcolor fills control and obscures an any color behind it

                                    transparent(0) - see through control

                        BorderStyle for label

                                    0 - None is the default

                                    1 - Fixed Single( surrounds control with a thin line)

                                                similiar to text box, indicates text the user cannot change

                        Appearance

                                    0-Flat

                                    1-3D

                        Text

                                    for text controls, can be used to give a default value

                        TabIndex

                                    determines the order in which a control receives the focus when the

                                    user is using the Tab key to tab through the application

                                                0 - first, 1 second, etc

                       

 

            Lock controls

                         to keep from changing

                        right click on empty area of form, click on Lock Controls

 

            Assigning Access Keys

                        assign to any ket that has caption

                        place & to left of character(alt and character gives focus)

                        place & on caption on label immediatley preceding text box in tab order

                        access keys must be unique

                        rules

                                    use first letter of caption if available

                                    use another meaningful character

                                    use distinctive consonant

                                    Lastly, use a vowel or a number in the caption

 

            Assignment Operator

                        =

 

            Methods

                        {form}.PrintForm

                                    Prints the named form

                        SetFocus

                                    moves focus to specified control

                                                {control Name}.SetFocus

            Operators

                        ^             exponential

                        -            negation

                        *             multiplication     / division

                        +             addition             - subtraction

 

            Functions

                        Val(string)

                                    returns the string as a numbwe

                        Format

                                    Format(string, "currency")

            BorderStyle

                        Effects MinButton, MaxButton, ControlBox

                        default 2-Sizable

                                                all

                                    0- None

                                    1 - Fixed Single

                                                Close button only