Programming guides for beginner...
Any comments are welcomed....
I hope it helps!!! Thanks for drop by...

Thursday, September 16, 2010

Paper Scissors Stone game using visual basic 2008






This is a video that recoded by me to show the game (paper scissors stone) that I created.
The coding and the application is provided in the following link.

Please comment and rate my video. If you feel my video help you a lot, please help me share it to your friends. Thanks.

Megaupload:
http://www.megaupload.com/?d=XS8C0PBU

Thursday, September 9, 2010

tic tac toe tuturial using visual basic 2008

The video is uploaded in

http://www.youtube.com/watch?v=Cj-A7bxpiZA




The coding is provided at:

Please leave comments.

Tuesday, September 7, 2010

Window shot-cut keys using visual basic 2008

This is coding for window shot-cut keys application. This application include shot-cut to calculator, notepad, command prompt, task manager, shutdown, restart, and log off.
the coding are provided following.
"
Public Class Form1
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
Me.TopMost = True
Else
Me.TopMost = False
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Shell("Calc")
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Shell("Notepad")
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
SendKeys.Send("^+{esc}")
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Shell("cmd")
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
MsgBox("Loging off computer in " & TextBox1.Text & " seconds.", MsgBoxStyle.Information)
TextBox1.ReadOnly = True
Timer1.Start()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
MsgBox("Restarting computer in " & TextBox1.Text & " seconds.", MsgBoxStyle.Information)
TextBox1.ReadOnly = True
Timer2.Start()
End Sub

Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
MsgBox("Shuting down computer in " & TextBox1.Text & " seconds.", MsgBoxStyle.Information)
TextBox1.ReadOnly = True
Timer3.Start()
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Button5.Enabled = False
Button6.Enabled = False
Button7.Enabled = False
Button8.Enabled = True
Try
If TextBox1.Text = "0" Then
Button9.Enabled = True
If CheckBox2.Checked = True Then
Timer1.Stop()
Shell("Shutdown -l -f -t 00")
Else
Timer1.Stop()
Shell("Shutdown -l -t 00")
End If
ElseIf TextBox1.Text = Nothing Then
Button9.Enabled = True
If CheckBox2.Checked = True Then
Timer1.Stop()
Shell("Shutdown -l -f -t 00")
Else
Timer1.Stop()
Shell("Shutdown -l -t 00")
End If
Else
TextBox1.Text = TextBox1.Text - 1
End If
Catch ex As Exception
Button5.Enabled = True
Button6.Enabled = True
Button7.Enabled = True
Button8.Enabled = False
TextBox1.ReadOnly = False
Timer1.Stop()
MsgBox("Error, please insert only integer", MsgBoxStyle.Critical)
End Try
End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Button5.Enabled = False
Button6.Enabled = False
Button7.Enabled = False
Button8.Enabled = True
Try
If TextBox1.Text = "0" Then
Button9.Enabled = True
If CheckBox2.Checked = True Then
Timer2.Stop()
Shell("Shutdown -r -f -t 00")
Else
Timer2.Stop()
Shell("Shutdown -r -t 00")
End If
ElseIf TextBox1.Text = Nothing Then
Button9.Enabled = True
If CheckBox2.Checked = True Then
Timer2.Stop()
Shell("Shutdown -r -f")
Else
Timer2.Stop()
Shell("Shutdown -r")
End If
Else
TextBox1.Text = TextBox1.Text - 1
End If
Catch ex As Exception
Button5.Enabled = True
Button6.Enabled = True
Button7.Enabled = True
Button8.Enabled = False
TextBox1.ReadOnly = False
Timer2.Stop()
MsgBox("Error, please insert only integer", MsgBoxStyle.Critical)
End Try
End Sub

Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
Button5.Enabled = False
Button6.Enabled = False
Button7.Enabled = False
Button8.Enabled = True
Try
If TextBox1.Text = "0" Then
Button9.Enabled = True
If CheckBox2.Checked = True Then
Timer3.Stop()
Shell("Shutdown -s -f -t 00")
Else
Timer3.Stop()
Shell("Shutdown -s -t 00")
End If
ElseIf TextBox1.Text = Nothing Then
Button9.Enabled = True
If CheckBox2.Checked = True Then
Timer3.Stop()
Shell("Shutdown -s -f")
Else
Timer3.Stop()
Shell("Shutdown -s")
End If
Else
TextBox1.Text = TextBox1.Text - 1
End If
Catch ex As Exception
Button5.Enabled = True
Button6.Enabled = True
Button7.Enabled = True
Button8.Enabled = False
TextBox1.ReadOnly = False
Timer3.Stop()
MsgBox("Error, please insert only integer", MsgBoxStyle.Critical)
End Try
End Sub

Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Timer1.Stop()
Timer2.Stop()
Timer3.Stop()
Button8.Enabled = False
Button5.Enabled = True
Button6.Enabled = True
Button7.Enabled = True
Button9.Enabled = False
TextBox1.ReadOnly = False
MsgBox("Process cancel")
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button8.Enabled = False
Button9.Enabled = False
End Sub

Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
Shell("shutdown -a")
Button5.Enabled = True
Button6.Enabled = True
Button7.Enabled = True
Button8.Enabled = False
Button9.Enabled = False
TextBox1.ReadOnly = False
End Sub
End Class

"
Video will be uploaded soon in youtube.
please refer to this link: http://www.youtube.com/user/tohcw90


To download the file go to following link.
please inform me if the link had expired.

Password: tutorialoflife

For more details, please leave comments.

Computer Shortcuts tips

Winkey + D = show desktop
Winkey + E = open explorer
Winkey + R = start run
Winkey + M = minimize all
Winkey + shift + M = restore minimized windows
Winkey + F = search folder
Winkey + U = Utility manager
Winkey + break = system properties
Winkey + X = (for window 7) window mobility center
Winkey + L = switch user/logoff/lock computer
Ctrl + Esc = Open start menu

Monday, September 6, 2010

Visual Basic 2008 tutorial on shutdown timer

This is my first tutorial on visual basic 2008. Any question please leave comment.
Tutorial on shutdown timer

coding:
"
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = Nothing Then
MsgBox("Please insert a value")
Else
Button3.Enabled = True
Timer1.Start()
End If

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If TextBox1.Text = Nothing Then
MsgBox("Please insert a value")
Else
Button3.Enabled = True
Timer2.Start()
End If
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Timer1.Stop()
Timer2.Stop()
Button4.Enabled = False
MsgBox("Process Cancel")
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If TextBox1.Text = "0" Then
Timer1.Stop()
Button4.Enabled = True
Button3.Enabled = False
Shell("shutdown -s")
Else
TextBox1.Text = TextBox1.Text - 1
End If
End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
If TextBox1.Text = "0" Then
Timer2.Stop()
Button4.Enabled = True
Button3.Enabled = False
Shell("shutdown -r")
Else
TextBox1.Text = TextBox1.Text - 1
End If
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Shell("shutdown -a")
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button4.Enabled = False
Button3.Enabled = False
End Sub
End Class
"

Video:

Files:
Password: Demonoid