Wednesday, December 3, 2008

Temperature Converter


With winter around and daily temperature change has become a concern for many people especially those who travel a lot. They are constantly checking out temperature readings everyday However, different parts of the world often use different temperature scales, some of them use Fahrenheit and some use Celsius, so the readings can be confusing. Therefore, it is nice if we have a program that can convert Celsius to Fahrenheit and vice versa. And I have done just that using Visual Basic 6. The code is like this:

Private Sub Command1_Click()
Dim cel, Fah As Single
cel = Val(txtC.Text)
Fah = Val(txtF.Text)

If txtC.Text <> "" And txtF = "" Then
Fah = ((9 / 5) * cel + 32)
txtF.Text = Round(Fah, 1)
Else
cel = (5 / 9) * (Fah - 32)
txtC.Text = Round(cel, 1)
End If

End Sub

Private Sub Command2_Click()
txtC.Text = ""
txtF.Text = ""

End Sub

Thursday, November 27, 2008

More SQL keywords in VB6

Another New lesson is added! This lesson teach you how to use more SQL keywords in database queries. You will learn the keywords WHERE for specifying certain criteria to search for data in a table. For details, please refer to

http://www.vbtutor.net/lesson21(d).html

Wednesday, November 26, 2008

Using SQL in Visual Basic 6

I have created another new tutorial lesson. In this lesson, I discuss and demonstrate the use of Structured Query Language (SQL) in Visual Basic 6 environment. You will learn how to use the SQL keywords such as SELECT and FROM to look for certain data in a database. Click the link below to learn about SQL now.

http://www.vbtutor.net/lesson21(c).html

Saturday, November 22, 2008

DataGrid Control

I have included a new lesson related to database management. In the previous chapters, we use textboxes to display data by connecting them to a database via Microsoft ADO data Control 6.0. The textbox is not the only control that can display data from a database, many other controls in Visual Basic can display data. One of the them is the DataGrid control. DataGrid control can be used to display the entire table of a recordset of a database. It allows users to view and edit the data. Please click on Lesson 21(b) to view the latest lesson.

Wednesday, October 22, 2008

Basic Programming- 30 years ago

Visual Basic have come a long way since the invention of the BASIC language. When I first started learning BASIC back in the late 70's of the last century, personal computers were not popular yet. I remembered I was using the punch card machine to key in the program code, each card represent a program statement. So, for a long program, we have to use many cards. We don't get the output immediately, what we do was to send our cards to the processing center when the technicians would feed the cards into the main frame computer. We would only get our printouts the following day . How slow was it! But we never complain, because we were the lucky ones who have access to the computer those days, many people out there were still ignorant about computer. So, see how lucky you are today, you can have a laptop with the computing power matching or better than the old mainframe, and you get your output instantly!

Sunday, October 19, 2008

Financial Crisis Self Help

The financial crisis is getting more and more serious, many financial institutions and banks are going bust and stocks are sinking! So beside doing programming for fun, we should also think of some self-help methods to face the financial crisis. For me, the best way is to earn some money online to supplement our dwindling incomes. I have started a blog to discuss how to make money online, you might find it useful in this critical time. Click on the link below to browse the blog.

Online Business Help Center

Friday, October 10, 2008

Creating a web browser in VB2008

Creating a web browser in Visual Basic 2008 is a relatively easy job. You don't need to type in a lot of complicated procedures. Just follow this link to see how it is done.

Creating a web browser in Vb2008