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

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

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

Plat04

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.

Hannes DuPreez
Hannes DuPreez
Ockert J. du Preez is a passionate coder and always willing to learn. He has written hundreds of developer articles over the years detailing his programming quests and adventures. He has written the following books: Visual Studio 2019 In-Depth (BpB Publications) JavaScript for Gurus (BpB Publications) He was the Technical Editor for Professional C++, 5th Edition (Wiley) He was a Microsoft Most Valuable Professional for .NET (2008–2017).

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read