Vortex86DX-MSJK Windows Embedded CE 6.0 R3 Jump Start Rev 2.2
Page 62 of 144
Fig. 54 -
Visual Studio 2005 IDE
Add Codes and Build the Application Project
In the following steps, we will make some changes and add some simple code to the application:
•
Resize
Form1
to a smaller size, 320 x 240.
•
Change
Form1
’s caption to “VS2005 Managed Code Hello World”.
•
Delete the
mainMenu1
component from the project.
•
Add a text box to
Form1
, change the name to
textHelloWorld
, clear the default content and
place the text box at the center of the form.
•
Add a button to
Form1
, change the name to
buttonHelloWorld
, change the caption to
“Hello World” and place the button to the center of the form, just below the
textHelloWorld
text box.
•
Double click on the Hello World button to bring up the source code window showing the
buttonHelloWorld_Click
event code.
•
Add the following codes to the
buttonHelloWorld_Click
event:
private
void
buttonHelloWorld_Click(
object
sender,
EventArgs
e)
{
textHelloWorld.Text =
"First Hello World!"
;
textHelloWorld.Text =
"Second Hello World!"
;
textHelloWorld.Text =
"Third Hello World!"
;
textHelloWorld.Text =
"Final Hello World!"
;
}
The VS2005 IDE should look similar to the following, as shown in Figure 55.