week 2
Environment NewLine
Lets look over a function that will enable the inclusion of additional lines
The use of the the Environment.NewLine option in VB.Net enables programmers to seperate content over a new line in an object.
Say for example you have a button that when a user triggers it the event inputs a sentance or stucture of words in to
an object (say a Rich Text Box). The text is reqiured to be shown over a number of lines in the object you would use the Environment.NewLine
feature to enable this.
It is worth remembering that if you wish to make this happen with other elements within the code line, i.e. some text, you will need to add the
+ sign, as in the example below.
" + Environment.NewLine + Environment.NewLine + "
")
Selection Start
The selection start control indicates the insertion point, or caret, for new text. If you set this property to a location beyond the length of the text in the control, the selection start position will be placed after the last character. This control may be useful when considering the inclusion of information to a text area or rich text box. In the example below you can see that the value that is gathered from this control is stored in a variable so that if the program appends any information it can be called and input at this point.
Using the Activity Sheet, create a webpage editor, you should ensure that you pay close attention to the table provided in the instructions as this
will provide you with the naming conventions that should be used when creating a program in VB.Net.
EXTENTION
Now that you have created the editor, create a button the inputs the simple HTML structure in to the Rich Text Box.
STRETCH & CHALLENGE
Now that you have this interactivity enabled in to your editor, try and enable the use to input tags at the point of where the cursor is in the
Rich Text Box

The information covered in this page covers the knowledge and understanding linked to the criterion in the table below.
Links to Assessment Criteria | Description |
---|---|
LO1 |
Understand the features of event driven programming: Key features: service oriented; time driven; event handlers; trigger functions; events eg mouse, keyboard, HTML object, form, user interface; event loops; flexibility; suitability for graphical interfaces; simplicity of programming; ease of development |
LO2 |
Be able to use the tools and techniques of an event driven language: Triggers: eg key press, alarm, system event, touch screen event, mouse click Tools and techniques: eg use of tool boxes and controls, selection, loops, event handlers, triggers, objects and object properties, menus; debugging tools Variables: declaring variables; scope of variables; constants; data types |
Functional Skills English | Reading, Writing, Comprhension, Problems Solving, Nouns |
Functional Skills Maths | Compression,Reduction |
British Values | None covered in this session. |
Equality and Diversity |
Last Updated
2018-04-16 13:27:00
English and Maths
English
0Maths
Stretch and Challenge
Stretch and Challenge
- Fast to implement
- Accessible by default
- No dependencies
Homework
Homework
Equality and Diversity Calendar
How to's
How 2's Coverage
00
Links to Learning Outcomes |
Links to Assessment criteria |
|
---|---|---|
Files that support this week
Week 1←
PrevWeek 2←
PrevWeek 3←
Prev→
Next