Visual Basic 2012 Lesson 3

In VB2012, before writing an event procedure for a control in VB2012 to response to a user’s input or action, you have to set certain properties for the control to determine its appearance and how it will work with the event procedure. You can set the properties of the controls in the properties window at design time or at run time.

For details, please follow the link below:

http://www.vbtutor.net/index.php/visual-basic-2012-lesson-3-working-with-control-properties/

For tutorial updates and participation in discussion, follow us on our Facebook page.

Inventory Management System

I have spent two weeks in working on  an inventory management system. Half way through I  encountered numerous issues that caused many sleepless nights thinking on ways to overcome them. Finally I was able to accomplished the task and here is the finished product. Insert is the interface of the system. I will discuss about the code later.

Converting Decimal Number to Hexadecimal Number

In VB6, we can convert a decimal number to a hexadecimal number and vice versa easily:

Here is the code for converting decimal number to hexadecimal number and vice versa:

1. To convert decimal to hexadecimal, use the following syntax:

Dim hex_val As String, myValue as Double

hex_val=Hex(myValue)

2. To convert hexadecimal to decimal, use the following syntax:

Dim hex_val As String, myValue as Double

myValue=CInt(“&H” & hex_val)