Saturday, September 20, 2008

Jay on the run

Long holiday has passed and the school will start again. Maybe i'll be on the run too.

Wednesday, September 10, 2008

L

A genius detective in Death Note movie, known as L. Using his intelligence to solve lots of mystery cases. Cool!

Saturday, September 6, 2008

Jay Again In Concert



Jay in concert, playing piano... Freshly draw....

Harry Potter



I wish I can join the exciting of magic world. Then I can own a time turner, so I can back and forth to the time i want...Isn't it incredible???

Monday, September 1, 2008

Useful code in VB2005 to lock input key

This code is written in the keypress event handler. It will lock the type of key. So, user won't type the restricted key(s), which is defined by the programmer.
Beside alphabet and digit, this code also available for keys like quotation, which will cause error for input into database by using SQL query.
Example code below means user only can input digit and plus symbol.

----------------------------------------------------------------------------------
Private Sub txtphone_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txttelp.KeyPress
If Not (Char.IsDigit(e.KeyChar) OrElse Char.IsControl(e.KeyChar)) AndAlso Not e.KeyChar = "+"c Then e.Handled = True
End Sub
----------------------------------------------------------------------------------

Try it yourself, it really works!!!