3.The Smart Device Application Wizard appears. Select Pocket
3.The Smart Device Application Wizard appears. Select Pocket PC and Windows Application andclick OK. 4.Anew Pocket PC project is created, again with the default form sized according to the standardsize of the device. 5.Use the toolbox to drag and drop one label, two text boxes, and a button control onto the Form. 6.Using the Properties window, change the Name property of the first text box to txtCriteria, the Name of the second text box to txtResults, and the Name property of the button tobtnRetrieve. Modify the MultiLineproperty of txtResultsto True. Rename the Textproperty of the labels as shown in Figure 8-8. Figure 8-87.Add the following code to btnRetrieve_Clickof Form1, modifying the code to replace [YourSubscriptionIDHere]with your Subscription ID for the Amazon.COM API: Private Sub btnRetrieve_Click(ByVal sender As System.Object, ByVal e As _ System.EventArgs) Handles btnRetrieve.ClickDim oReq As System.Net.HttpWebRequestDim oResp As System.Net.HttpWebResponseoReq = System.Net.HttpWebRequest.Create( http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&SubscriptionId=[Your Subscription IdHere]&Operation=ItemSearch&SearchIndex=Books&Keywords= & txtCriteria.Text) use the StreamReader to get the responseoResp = oReq.GetResponseDim sr As New System.IO.StreamReader(oResp.GetResponseStream) Dim strResponse As String read the entire stream to retrieve the results190Chapter
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services