Style Conventions
We have used a number of different styles of text and layout in this book to help differentiate between the different kinds of information. Here are examples of the styles we used and an explanation of what they mean.Code has several font styles. If it is a word that we are talking about in the text - for example, when discussing a For...Next loop - it is in this font. If it is a block of code that can be typed as a program and run, then it is in a gray box:
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
End Sub
Sometimes, you will see code in a mixture of styles, like this:
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
MsgBox(TextBox1.Text)
End Sub
In cases like this, the code with a white background is code that we are already familiar with. The line highlighted in gray is a new addition to the code since we last looked at it. Code with a white background is also used for chunks of code that demonstrate a principle, but which cannot be typed in and run on their own.
Advice, hints, and background information comes in this type of font.
Important
Important pieces of information come in boxes like this.
Important Words are in a bold type font.Words that appear on the screen, or in menus like File or Window, are in a similar font to the one you would see on a Windows desktop.Keys that you press on the keyboard like Ctrl and Enter are in italics.Commands that you need to type in on the command line are shown with a > for the prompt, and the input in bold, like this:
>something to type on the command line