SDE
Unlike Embedded Visual Basic® (it is independent), SDE requires you to install Visual Studio® .NET or Visual Basic .NET in advance. If you are not familiar with the Visual Studio .Net world, I will provide you with the following four points.
You should consider purchasing a new computer from an unused. Visual Studio .NET likes any resource you can get. The higher the configuration of the computer, the better the Visual Studio .Net is running, the better your mood will. Please read the entry documentation with the SDE Beta version. These small files are very displaced, so they are often lost, but even so, you should also read them. They will make your life easier. Find a masterpiece telling Visual Basic .NET and read it carefully. The difference between Embedded Visual Basic and Visual Basic .NET is confused. If you stare at the screen for a long time, you will naturally consider problems as usual developers, which is not advisable. As John is pointed out in his article, you can buy a specific language version of Visual Studio .NET cheap. There are three types of language versions currently available: C , C # and Visual Basic. Now the C version does not support SDE (very sorry, john!), So you can use Visual Basic and put John's column on one side.
Your first SDE application
Last Food, I made a brief introduction to SDE in the first smart device extensions. Now there is some changes, such as the addition of the form designer, plus you can try to generate an app, so I think the best way is to lead you to gradually generate a simple SDE application.
Start a new project
When you create a new project in Visual Studio .NET, you will first see SDE for the first time. As shown in Figure 1, there is an additional template titled Smart Device Application in the "Visual Basic Project" folder of the New Project dialog. Select this template and enter the name "Hello World" to start generating a project.
Figure 1: New Project dialog
Click the "OK" button in the New Project dialog box, the screen will display the Smart Device Application Wizard, as shown in Figure 2. In this wizard, you can choose two items: the target of the project, and the type of item to create. For example, I will select Pocket PC as a target and create a Windows Application project.
Figure 2: Smart Device Application Wizard (Intelligent Device Application Wizard)
When you click the OK button in the Smart Device Application Wizard, Visual Studio .NET will create a new project according to the specified settings and configure it. The project will then load into the Visual Studio .NET development environment (as shown in Figure 3).
Figure 3: SDE project in Visual Studio .NET IDE
Set project properties
SDE provides a number of ways to configure project properties. The first method: You can use the Properties window shown in Figure 4.
Figure 4: "Properties" window
The second method: A Deployment Device combo box is nestled in the IDE toolbar (shown in Figure 5). This combo box can be used to easily switch between emulator and devices when testing applications. Figure 5: Select deployment device from the IDE toolbar
Third way: Right-click the item in Solution Explorer, then select "Properties" from the bottom of the pop-up menu, so that the Properties dialog (as shown in Figure 6). This method allows you to easily use interfaces for all projects.
Figure 6: Project Properties dialog
For convenience of explanation, I intend to change the Output File Folder setting to / Windows / Start Menu to force the application to add to the Start menu.
Generating interface
When I first talked to SDE in October, the Form Designer (Form Designer) has not been completed. Users who use SDE earlier are very happy when they know the Beta version contains a complete Form Designer (Form Designer). The working mechanism of the designer is similar to the Embedded Visual Basic IDE, and most users have a certain understanding.
Figure 7: Form Designer
At the bottom of Figure 7, you can see that the menu hook has been added to the form. In this way, SDE has a menu designer. You must now want to jump and cheer, is it? Of course, your menu code does not have to be less sharply used when using Embedded Visual Basic.
This feature is too good, and I am going to add a menu to my Hello World application. What is the purpose of this menu? There is no use, just because it is great. To add a menu, first click on the MainMenu1 graphic below the form. A deep gray box will be added near the top of the form. This is the original appearance of the menu. Click this dark gray box to configure the menu and menu items through a graphic mode. Figure 8 shows the final appearance of the menu.
Figure 8: Menu Designer
Here, I want to construct a simple interface. Figure 9 shows the Visual Studio .NET toolbox, where the Device Controls section is added by SDE. I will use the toolbox to select the interface part, just like this in Embedded Visual Basic.
Figure 9: Toolbox
From this toolbox, I will choose a button to add it to my application. I have changed the TEXT attribute of this button to Click ME to make it a style of "Aili Silk Wheelland". For simplicity, the above is all the work I do for this interface.
Write some code
Below, I want to write some code. I just want to add a line of code. When the user clicks the button, the screen will display the information "Hello World!".
I just need to double-click the button in the Form Designer to access the button's click event, just like it in Embedded Visual Basic. Figure 10 shows this code window. As you can see, I am using MsgBox when I display this simple information.
Figure 10: Code window
Test in the emulator
Now, I want to start testing the Hello World application. Like early versions of Microsoft Visual Basic-based mobile development tools, SDE supports testing on emulators and devices. Unlike earlier versions, the SDE emulator is a true binary image of the target device. This means that the emulator can provide a more powerful and more realistic test environment. This emulator is too cool. You can customize it as needed. You can specify whether it must use, the screen size, the color depth of use, the supported hardware port, and whether it has an Ethernet function.
Note: The emulator used by Embedded Visual Basic is a subfolder "exists" on your system as a C: / Windows CEELS. This configuration allows you to simply copy files or copy files in the emulator using the file resource manager to copy files or copy files in the emulator. In contrast, the SDE emulator is more like a real device. Thus, use the SDE emulator, when copying the file therefrom, is like using the device.
To test on the emulator, first select the Pocket PC Emulator (Pocket PC Simulator) from the Deployment Device combo box of the Visual Studio .Net toolbar, then click the Start button. Later, the emulator starts start. Then, load my app and start running, as shown in Figure 11.
Figure 11: Application running in the emulator
Test on the device
To switch to the device, simply select the Pocket PC Device in the Deployment Device combo box, then click the Start button. Like the emulator, my app is copied to the Pocket PC and then start running.
Convert existing Embedded Visual Basic Application
I know that existing Embedded Visual Basic developers are already considering how to convert the Embedded Visual Basic application to SDE. This arduous task is about to begin. Although I do know a process containing 57 steps, I can use the Embedded Visual Basic, Visual Basic, Visual Studio .NET and SDE to convert the Embedded Visual Basic application to SDE, but the converted application is as "Star Trek "The ship ship debris in bad luck.
Summary SDE BETA
Now you have probably understand how to generate an application using SDE. However, this article introduces SDE only fur, and does not show SDE's power and deepness of the functionality provided by mobile developers. SDE provides developers with a tool that can be used to create next-generation mobile solutions. Its powerful, flexible, and various functions are unimaginable when using Embedded Visual Basic.
But don't be excited, from the conversion of the Embedded Visual Basic to SDE is by no means a simple process. In fact, it is totally likely to be a nightmare. Visual Basic .NET is a new horses, very powerful, very difficult to tame. But in the next few months, I will try to write some articles on the SDE's general constructor to make it easier for you to master it.
If you have not started, here you strongly recommend that you read John's article Some Very Smart Software (English). Of course, I know that he is specializing in C / C #. In fact, there are very many concepts and technologies between languages to learn from each other when using Smart Device Extensions. With John's articles and what I tell here, you should build your own Visual Basic-based web services. Return to the original road
This is the topic of this month. I will leave for a while and then start a long-lasting surfing. After a month of the dust, I will bring you a new SDE application. It is recommended that you go to the bookstore to buy one or two books about Visual Basic. Net. If you can get some SDE's entry knowledge, it will be helpful. Let's see it next month, now, I have to have a message.
John Kennedy is the technical writer / programmer of Visual C group; at night, the mysterious life of Pocket PC developers.
Larry Roof is a partner of Tonked (English), which is a company specializing in mobile solution development and training. He is the author of Professional Visual Basic Windows CE, which can be purchased from Wrox Press. Author: Larry Roof, 2002 April 30 http://www.microsoft.com/china/MSDN/library/archives/library/dnroad/html/road04242002.asp