Click here to Skip to main content
Click here to Skip to main content
Go to top

Pocket PC Simulated Resizable Browser

, 18 Jan 2008
Rate this:
Please Sign up or sign in to vote.
A mini browser for PDA web developers.

Pocket PC Browser

Introduction

Developing a web page for PDAs often requires special consideration on user experience because the PDA screen is substantially smaller than those in other development environments. Developers usually re-size the desktop browser to approximately the size of the PDA browser for debugging and testing. While this is OK, the developer experience and user experience are not the same. This Pocket PC Simulated Browser intends to close the gap between developer experience and user experience. It is not an emulator. It is just a browser allowing developers to have a better experience of their final product.

New Feature in Version 3

In the first two versions, you cannot alter the size of this browser. However, in real life, not all PDA and PDA phones have the same browser size. So, I included a resizable browser in this version.

Using the Code

This is a Windows Forms project. I mostly rely on Visual Studio 2005's built-in WebBrowser control for development. All of the code is quite straight-forward and are self-explanatory. Please feel free to download the source code to find out more about the programming logic.

I also included an installer. You can install the browser to your PC without understanding the internal mechanism. The pre-requisite is to have .NET Framework 2.0 installed on your Operating System. After installing the program, you can use it as a mini browser.

However, the purpose of this project is to facilitate developers to use it during development. We, therefore, need to link it up to Visual Studio 2005.

Linking the Brower to Visual Studio

After installing this browser, you can open a web application in Visual Studio 2005. On the Solution Explorer, right-click the web page that you want to use this browser with and select "Browse With..". You can see the following dialog box for adding any browser:

Points of Interest

Unlike C#, VB.NET starts a Windows Application from Windows Forms directly. While this is very convenient, it cannot provide the opportunity for you to pass in external parameters or arguments. In this project, I need to link it to Visual Studio 2005. Visual Studio 2005 will pass the web page of the development server to the browser for debugging. So, I need to tweak the start-up of this project with the following code:

Module Module1

    Friend strHomeUrl As String = ""
    Sub Main()
      Dim arrArgs() As String = Command.Split(",")

      If arrArgs(0) <> Nothing Then
        strHomeUrl = arrArgs(0)
      End If

      Application.Run(New Form1)

    End Sub

End Module

As soon as Form1 is loaded, it can call strHomeUrl in its load event. However, the string passed from Visual Studio 2005 is bracketed by a pair of quotation marks. These quotation marks must be removed by the program so that strHomeUrl can become a valid URL.

History

  • Project was posted at CodeProject in May 2007.
  • Project updated in June 2007 with better Favorite support.
  • Project updated in September 2007, added a resizable feature.
  • Source code of version 3 added upon readers' request.
  • In December 2007, added a web-based version. It can be found in http://www.codeproject.com/KB/webforms/pbc1.aspx.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

petersgyoung
Founder Bisware Technology Limited
Hong Kong Hong Kong
I am an IT consultant and software developer based in Hong Kong.

Please click here to see my blog and my company at biswaretech.com

Comments and Discussions

 
GeneralVersion 3 Source Code Pinmemberknarfm15-Jan-08 3:41 
GeneralRe: Version 3 Source Code Pinmemberpetersgyoung15-Jan-08 15:28 
GeneralRe: Version 3 Source Code Pinmemberknarfm26-Jan-08 6:11 
General"External" arguments in VB Pinmemberreinux16-Sep-07 11:56 
GeneralRe: "External" arguments in VB Pinmemberpetersgyoung17-Sep-07 15:16 
GeneralBe aware, the Pocket IE is not only limitted in size compared to Desktop IE Pinmemberhjgode7-Jun-07 23:57 
GeneralRe: Be aware, the Pocket IE is not only limitted in size compared to Desktop IE Pinmemberpetersgyoung8-Jun-07 18:45 
AnswerRe: Be aware, the Pocket IE is not only limitted in size compared to Desktop IE Pinmembercommandant_.16-Jun-07 23:08 
GeneralRe: Be aware, the Pocket IE is not only limitted in size compared to Desktop IE Pinmemberleechangjun29-Mar-11 21:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 18 Jan 2008
Article Copyright 2007 by petersgyoung
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid