Some examples of conversion functions of VB6 to VB.NET

Remove X characters left:

'VB6
Dim a As Integer = 12345
Debug.WriteLine (Microsoft.VisualBasic.Left (a, 2))

'VB.NET
Dim a As Integer = 12345
Debug.WriteLine (num.ToString.Substring (0, 2))

Remove X characters from the middle of a string:

'VB6
Dim a As Integer = 12345
Debug.WriteLine (Microsoft.VisualBasic.Mid (a, 1, 1))

'VB.NET
Dim a As Integer = 12345
Debug.WriteLine (num.ToString.Substring (0, 1))

Check what the ascii code of a character:

'VB6
Debug.WriteLine (Asc ( "A"))

'VB.NET
Debug.WriteLine (Convert.ToByte ( "A"))

Converts an ascii code in your character:

'VB6
Debug.WriteLine (Chr (65))

'VB.NET
Debug.WriteLine (Convert.ToChar (65))

Displays the current date / time:

'VB6
Debug.WriteLine (Now.ToString)

'VB.NET
Debug.WriteLine (DateTime.Now.ToString)

Displays a message on the screen:

'VB6
MsgBox ( "test!")

'VB.NET
MessageBox.Show ( "test!")

Converts to integer:

'VB6
Debug.WriteLine (CInt ( "123"))

'VB.NET
Debug.WriteLine (Integer. Parse ( "123"))

Convert to String:

'VB6
Dim a As Integer = 12345
Debug.WriteLine (CStr (num))

'VB.NET
Dim a As Integer = 12345
Debug.WriteLine (num.ToString)

Checks whether an expression is numeric:

'VB6
Dim a As String = "12345"
If IsNumeric (num) Then
'True
End If

'VB.NET
Dim a As String = "12345"
Dim result As Integer
If Integer. TryParse (num, result) Then
'True result and the variable
'Gets the result in whole
End If

Checks whether an expression is a valid date:

'VB6
Dim data As String = "10/2/2010"
If IsDate (date) Then
'True
End If

'VB.NET
Dim data As String = "10/2/2010"
Dim dt As DateTime
If DateTime.Parse (date, dt) Then

'True and the variable dt
Gets the result as DateTime
End If

There are many more examples, but these serve to show some of the ways how we can replace the former functions of VB6 and start the program. NET way ”

Hope that helps!

Printing With A Pencil Stub

So you don’t want to join  pencil stubs and make a long pencil. No worries, we have another alternative, how about using them to print on paper. Yes, like a printer that uses pencil to print your documents. Traditional don’t you think? I feel the concept gets even more radical because it proposes the use of eraser to erase off mistakes! Do I hear my office scream in delight; no more cartridge woes!

Source…
Continue reading Printing With A Pencil Stub

Mitsubishi unveils massive 149-inch OLED display

I like the idea behind OLED TVs with better colors, thinner profiles, and less power needed to run the things. I am not a big fan of the massive price premium that is placed on most OLED sets right now. We have for the most part only seen smaller screen OLED displays on the market, but that is changing.

Mitsubishi has unveiled the gigantic 149-inch prototype OLED display at ISE-2010 in Amsterdam. The massive screen has a resolution of 1088 x 640 pixels with a 3mm pixel pitch. This thing may well be the best display ever for watching the Super Bowl.

The big screen has light output of 1500cd/m2 making it much brighter than the average LCD on the market today. I don’t even want to think of how expensive an OLED this size would be when a small OLED will set you back a grand or more today.