The Wayback Machine - https://web.archive.org/web/20160209174447/http://www.codeguru.com:80/columns/vb/getting-started-with-visual-basic-your-first-universal-app-vb-program.html

Getting Started with Visual Basic: Your First Universal App VB Program

In the first two installments of this series, I have explained how to get the Visual Basic software and how to start your first desktop application. Today, I will take this a step further and introduce to you a Visual Basic world with more possibilities. Today, you will learn how to create programs for other platforms.

Web Applications

A Web App, or a Web Application, is an application that runs in a Web browser. The benefit of Web applications is that, because it runs on a Web platform, the application does not need to be installed on a PC and that each PC has a Web browser on it.

For more information regarding Web Applications, read here.

Creating a Web Application

Once Visual Studio is loaded, you can click File, New Project. Select Web in the list and it will display a box similar to Figure 1:

Plat01
Figure 1: File, New Project

Or, you could click File, New Web site to show the following narrowed-down project template list, as shown in Figure 2.

Plat02
Figure 2: File, New Website

Select ASP.NET Web Forms Site from the list. A screen similar to Figure 3 will show. It does take a while because it needs to create the necessary details in your IIS. Before I continue, let me give some more background on IIS.

Plat03
Figure 3: Creating a Project

IIS

Internet Information Services (IIS) is an extensible Web server that is hosted locally on your PC. For more detailed information regarding IIS, read at the link earlier in this sentence.

After your Web site project has been created, your design interface will resemble Figure 4.

Plat04
Figure 4: Web Application design interface

It does look quite different from a Desktop application. Because you are creating a Web Application, not only the design will be different but your tools in your Toolbox will also look different, as shown in Figure 5.

Plat05
Figure 5: Web Application Toolbox

You may also want to have a look at the Solution Explorer.

Plat06
Figure 6: Solution Explorer

It already contains three Web pages:

  • Default
  • About
  • Contact

This is your app's skeleton. Default will be your home page, which is the very first page of your Web site. Contact and About are quite self explanatory.

Because a basic interface has already been created, you can feel free to build further onto the page, or you could add your own controls from the toolbox to it. For now, Let us make use of the existing design.

Design your page as follows:

Plat07
Figure 7: Our Design

You may have noticed that you cannot edit much of the design at this stage. Why? Well, to give each page of your app the same look and feel, you need to utilize the Site Master.

Site Master

Here is more information regarding the Site Master.

Click Site.Master in the top right corner of your page to open up the Site Master. Design your Site Master as follows:

Plat08
Figure 8: Site Master Design

Save your Project and switch back to the Default page. You will notice that the Site Master changes reflect now on this page as well.

Plat09
Figure 9: New Default

Mobile Applications

Mobile applications run on a mobile platform. This platform includes cellular phones and tablets. Unlike Web applications, there are many different types of mobile platforms, which include Windows Phone, Android, and iPhone. The trick here is that you need an IDE that can cater to all these different platforms. This is where Visual Studio comes in very handy because it has the ability to write a single mobile app that can be run on many different platforms; in other words, a platform-independent app gets created.

Creating a Mobile Application

First off: There are so many different mobile development tools available that can help you create decent mobile applications for all platforms. Later, I will supply a full list of available options to aid in your mobile development.

Secondly: Seeing the fact that this article is only an introduction, I have decided to take the easiest route for you to learn the concepts behind mobile programming. This project will be a Windows Phone project, which will only work on a Windows Phone.

Start Visual Studio, if you haven't already done so. Click File, New Project, and Select Windows Phone from the list and then select Windows Phone App and click OK. Your screen should resemble Figure 10.

Plat10
Figure 10: Mobile App Project

Again, your Toolbox as well as your Solution Explorer will look different.

Plat11
Figure 11: Solution Explorer

Design your Interface to resemble Figure 12:

Plat12
Figure 12: Our Design

Run your app and you will see that an Emulator starts up and displays your app as it would look like on a Windows Phone.

Here are a few links to get you started with Windows Phone Programming:

More mobile development platforms:

Conclusion

As you can see, the world of Visual Basic just gets bigger and bigger and Visual Basic just grows more and more powerful. With these different platforms, you now can explore Visual Basic's true power further.



About the Author

Hannes DuPreez

Hannes du Preez is a Microsoft MVP for Visual Basic for the eighth year in a row.

Related Articles

Comments

  • There are no comments yet. Be the first to comment!

Top White Papers and Webcasts

  • Rocket Mobile® for IBM i is an enterprise mobile application development and deployment platform for customers who rely on the IBM i system. Rocket Mobile for IBM i enables customers to leave proven applications in-place and rapidly repurpose them into new managed and secure mobile applications. Fast, easy creation of mobile, web, and hybrid mobile applications that deploy to any iOS, Android, or Windows mobile phone or tablet Built-in integration for seamless repurposing of existing IBM i applications …

  • Complex hybrid environments can make it difficult to track interdependencies, increasing the risk of disrupting critical business services. In this white paper by EMA, you'll learn how application discovery and dependency mapping can help you: Meet granular targets for availability, cost, and time-to-revenue for cloud services. Accelerate mean time to repair (MTTR) while communicating better with stakeholders. Manage even the most complex hybrid environments more efficiently and effectively Understand the …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date