CLICK HERE FOR BLOGGER TEMPLATES AND MYSPACE LAYOUTS »

Wednesday, October 22, 2008

The power of VB

During IT classes, we were taught how to use the Visual Basic (VB) software. It is basically a software that helps users to create programs that they want. I have wondered for so long why should we learn how to use this software and in what way would we be using this software in the future. Today, I have finally found an answer.

It seems like some people just have a built-in VB program in them. This is what I encountered today.

'Ask why is there no marks allocated for the points given


Private Sub Text1_Change()

If txttext1.text = "Teacher, why didn't you give me any marks for this?" Then
MsgBox "You don't have enough explanation!"

End sub



'Ask why the answer is wrong since the text book says that it is right


Private Sub Text1_Change()

If txttext1.text = "Teacher, why is this wrong? The text book says that it is correct." Then

MsgBox "Actually the book is wrong. They shouldn't have included this in it"

End sub


'Ask for other questions why the answer is wrong since it is clearly stated in the text book that it is correct


Private Sub Text1_Change()

If txttext1.text = "As the supplier is well aware that the stock in the market is piling, that's why they lower the price. You can refer to the text book for that." Then

Else if MsgBox "..."

Else


'Do nothing

Loop until the student stop asking

End if

End sub


Conclusion

'If there is any further extra class


Private Sub cmdExit_Click()

MsgBox "Count me out."
Unload Me

End Sub


Now I know how to use VB. I finally find it useful and it has become like my top favourite subject for the moment*.

* Subject to changes