Develop Windows Embedded Compact 7 Application Based on C # (II)

Source: Internet
Author: User

Zookeeper

14.2 image browser instance

Next, let's develop a Windows Embedded Compact 7 image browser.

First, create a SmartDevicetest application. 14.10

Figure 14.10 create a program Template

Insert an imagelist, A listbox, and a picturebox. Add 8 numbers to listbox. 14.11

Figure 14.11 insert related controls

Add 8 images to imagelist, 14.12

Figure 14.12 settings of imagelist

Insert the following code to trigger the listbox when it is selected.

Private void listBox1_SelectedIndexChanged (object sender, EventArgs e)

{

This. pictureBox1.Image = this. imageList1.Images [this. listBox1.SelectedIndex];

}

Then we run the program in the virtual machine, 14.13

Figure 14.13 running effect of a Virtual Machine

Select Image Display Effect 14.14 and 14.15

Figure 14.14 program Effect

Figure 14.15 program Effect

14.3 embedded browser application example

Next we will develop a Windows Embedded Compact 7 browser. 14.16

Figure 14.16 create a program Template

In the displayed dialog box, select Windows CE template, 14.17

Figure 14.17 select a program Template

Then, insert the following controls, with 6 buttons and a Webbrower, such as 14.18.

Figure 14.18 layout program controls

Insert the following code:

Private void button#click (object sender, EventArgs e)

{

This. webBrowser1.Navigate (new Uri (this. textBox1.Text, UriKind. Absolute ));

}

Private void button2_Click (object sender, EventArgs e)

{

This. textBox1.Text = "http://www.microsoft.com /";

This. webBrowser1.Navigate (new Uri (this. textBox1.Text, UriKind. Absolute ));

}

Private void button3_Click (object sender, EventArgs e)

{

This. webBrowser1.GoForward ();

}

Private void button4_Click (object sender, EventArgs e)

{

This. webBrowser1.GoBack ();

}

Private void button5_Click (object sender, EventArgs e)

{

This. webBrowser1.Refresh ();

}

Private void button6_Click (object sender, EventArgs e)

{

This. webBrowser1.Stop ();

}

Private void Form1_Load (object sender, EventArgs e)

{

This. textBox1.Text = "http://www.hasee.com/en/index.html ";

}

Then run the program in the Virtual Machine and click button -- GO to GO To the Shenzhou computer page, 14.19

Figure 14.19 program Effect

Click home to go to the home page. 14.20

Figure 14.20 Program

Conclusion 14.4

C # is a development language based on. NET Framework. In Windows Embedded Compact 7, C # is based on

. NET Compact Framework for development.

. NET Compact Framework (. net cf) is a subset of Microsoft. NET Framework. It is designed to provide application development support for Windows CE platform operating systems on Mobile devices.

Currently, the latest version of. NET Compact Framework is 3.5, which can be run on Windows Embedded Compact 7 mobile device operating system.

C # development for Windows Embedded Compact 7 requires the reader to have the foundation for C # Windows development. In fact, C # development for Windows Embedded Compact 7 is essentially not very different from C # development for Windows, readers must be aware of this issue in practice.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.