How to Develop Fullscreen or Skinned Visual Basic (VB) .Net Application Without DirectX

Set FormBorderStyle to None

Set WindowState to Maximized

Set StartPosition to Manual

Set ControlBox to False

Microsoft Visual Basic (VB) series have always been one of the most favorable software development tools for quite a large number of people. The fact that it is fairly easy to use is one thing that makes it preferable compared to other software development tools people can avail these days. However, this does not necessarily mean that the Visual Basic series are perfect in everything when it comes to programming.

As a matter of fact, even the latest installment which is the Visual Basic .Net is not so convenient to use if what the developers want is to develop some full screen or skinned applications. It is true that developers can always call DirectX Windows API (Application Programming Interface) to achieve that goal. One of the elements of DirectX is the DirectDraw which seems to be what is necessary for developing a full screen or a skinned application. However, not every single programmer – including you perhaps – out there will probably want to go through all the hassles that may occur for calling the Windows API.

Fortunately, there are quite a few things that can be done to accomplish the goal of developing either a full screen or a skinned VB .Net application without the need of using DirectX at all. First, let’s take a look at how to develop a full screen application. The techniques that are about to be discussed here apply to Visual Basic 2008 and Visual Basic 2010. By chance, they may also apply to Microsoft Visual Basic 2005. In this case, the techniques apply to the development of Windows forms application.

Developing a Full Screen Application

In order to develop a full screen application, what you will have to look at is the FormBorderStyle property of the application form. The default value of this property is normally ‘Sizable’. However, to make the application run in full screen, it is necessary to change this value to ‘None’. This will cause the form to look like a simple rectangle without any control box or caption.

As you can see from the image to the right, changing the FormBorderStyle gives you a new look of the application form. The next step, then, is the final step that will give your application a full-screen look. What you need to do is to change the value of the WindowState property of your application form. The default value is ‘Normal’ and you will have to change it to ‘Maximized’.

When you try to run the application afterwards, you will see that it runs in full screen mode. However, you may also want to do some more modifications. That said, you may want to change the value of the StartPosition property of the form from ‘WindowsDefaultLocation’ – which is the default value – to ‘Manual’ to make sure that your full screen application always starts from the left topmost section of your screen.

In addition to that, if you want to make sure that the users of your application can minimize, maximize or close your application only using the buttons and codes you provided instead of the ones in the control box, you will have to change the value of the ControlBox property to ‘false’. You may wonder why you should do this but, believe me, you may need to do this in some cases.

However, keep in mind that you will have to provide a way for your application users to at least be able to exit your application because they won’t be able to use Alt+F4 in this case. You won’t probably have to provide a way for them to minimize or maximize the application but exiting is always necessary.

Just for your information, you can make everything mentioned above simpler by simply adding codes on the sub Form1_Load as follow (assuming that you use the default form name which is Form1):

Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None

Me.WindowState = FormWindowState.Maximized

Me.StartPosition = FormStartPosition.Manual

Me.ControlBox = False

Developing a Skinned Application

In order to develop a skinned VB .Net application, you will also have to do the steps described above. However, you should not maximize the form and you are not ought to change the starting position of your application form either.

You will have to keep in mind that in developing a skinned Visual Basic .Net application, you need to adjust the size of your application form so that it matches the size of the image you are about to use as the skin of your application. Yes, skin is in fact made of image or a number of images.

Yet, before you adjust the size of your form, you need to manipulate the base image for the skin in advance. You can usually do this with an image editor application such as Adobe Photoshop or – if you prefer a freeware – GIMP (GNU Image Manipulation Program). Using the lasso tool provided in such an image editor, you will be able to cut the image following the texture of the objects in the image that you want to use for your skin. With the lasso tool, you can get rid of the rectangular borders.

Then, when you have acquired the perfect base image for your application skin, you will have to set the value of the BackgroundImage property of your form to the file of the skin image. In addition to that, you will also have to set the value of the TransparencyKey property of your application form to a color that is not likely to interfere with any colors you may need for your application skin.

Those are the steps necessary to develop a full screen or skinned application using the Microsoft Visual Basic .Net IDE (Integrated Development Environment) without even having to call the DirectX Windows API. Better yet, you won't even have to spend a cent out of your pocket for a third party skin maker application.

© 2011 Richie Setiawan. All rights reserved worldwide.

More by this Author


Comments

No comments yet.

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working