I will like to share some of the tips related to the developing the visual basic application. May be these tips will help you to enhance the performance of your visual basic application.
Error handling :
Handling error in any application is the most important topic in any of the application development. It is clear that you have to do the error handling but the thing is that how you do. For handling error if you are using the maximum resource then it is bad option. For example if your are working with Visual Basic 7 then handling the error using OnErrorGoto and Resume is exceedingly expensive. The better idea to go for try/catch option in Visual Basic 7.
Early Binding:
Use of early binding while developing the application in visual basic is really matter of concern because if you use the early binding at the right place then it will really increase the performance of your application. With the help of early binding stranger can be easily track down.
Use binary compare for comparing text:
If you require to compare text in you visual basic application. Then instead of comparing the text comparing the binary value is a better option to go for. Because binary compare is much more lighter then the text compare. If binary compare is lighter then definitely it will increase the performance.
Turn on option of Strict and explicit:
I am saying this because the use of option strict can protect you from the inadvertent late binding. This also helps in the higher level of coding discipline. The next option that option explicit is less restrictive when compared to the option strict. But that does not mean it is not a good option, this option explicit forces the programmer to provide the required information.
Try to avoid use of Format():
It will be better to use “toString()” at the place of “format()” if possible. Because this provides the same functionality by using this minimum overhead.
Use Charw instead of char:
Using charw at the place of char is a good option. The simple reason for that CLR uses Unicode internally and if you use char then it must be translated at the run time. Definitely this will result in the substantial performance loss. This performance loss can be avoided by using “charw”
Bookmarks