Tutorials on visual basic 2008, Manuals on visual basic 2008 - all projects include visual basic project file source codes! Visual Basic 2008 Tutorial. Easy Programs done on VB 2008
Showing posts with label system. Show all posts
Showing posts with label system. Show all posts
Thursday, July 5, 2012
Screen Capture Program Using Visual Basic 2008
Design
Running
You will need the following:
* 3 Buttons
* 1 Image Box
* 2 Timers
* 1 Save Dialog
Program Codes :
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Opacity = 0
Me.WindowState = FormWindowState.Minimized
Me.Text = "Please Wait..."
Me.Text = "Taking Picture"
Timer2.Enabled = True
Timer1.Enabled = True
Label1.Visible = False
Me.Size = New Size(602, 400)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim savefiledialog1 As New SaveFileDialog
Try
savefiledialog1.Title = "Save File"
savefiledialog1.FileName = "Screen"
savefiledialog1.Filter = "JPEG |*.jpg"
If savefiledialog1.ShowDialog() = DialogResult.OK Then
PictureBox1.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp)
End If
Catch ex As Exception
'Do Nothing
End Try
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
PictureBox1.Image = Nothing
Label1.Visible = False
Me.Size = New Size(602, 71)
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.Opacity = 100
Me.WindowState = FormWindowState.Minimized
Me.WindowState = FormWindowState.Normal
Timer1.Enabled = False
Me.Text = "Screen Capture"
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim bounds As Rectangle
Dim screenshot As System.Drawing.Bitmap
Dim graph As Graphics
bounds = Screen.PrimaryScreen.Bounds
screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
graph = Graphics.FromImage(screenshot)
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
PictureBox1.Image = screenshot
Timer2.Enabled = False
Label1.Visible = True
End Sub
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
Process.Start("http://vb2008tutorialz.blogspot.com/")
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Labels:
2008,
basic,
capture,
coding,
help,
information,
programming,
screen,
simple,
system,
tutorials,
visual
Batch File Maker Using Visual Basic 2008
Desing
Running
You will need the following:
*1 Rich Text Box
* 1 Menu Strip
* 1 Save Dialog
Program Codes :
Public Class Form1
Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
Try
PictureBox1.Visible = True
Dim dlg As SaveFileDialog = New SaveFileDialog
dlg.Title = "Save Batch File"
dlg.Filter = "Batch File (*.bat)|*.bat"
If dlg.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
RichTextBox1.SaveFile(dlg.FileName, RichTextBoxStreamType.PlainText)
End If
Catch ex As Exception : End Try
PictureBox1.Visible = False
End Sub
Private Sub NewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewToolStripMenuItem.Click
RichTextBox1.Clear()
End Sub
Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
MsgBox("Batch File Maker Created By Roatan Softwares")
End Sub
Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
Try
PictureBox1.Visible = True
Dim dlg As SaveFileDialog = New SaveFileDialog
dlg.Title = "Save Batch File"
dlg.Filter = "Batch File (*.bat)|*.bat"
If dlg.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
RichTextBox1.SaveFile(dlg.FileName, RichTextBoxStreamType.PlainText)
End If
Catch ex As Exception : End Try
PictureBox1.Visible = False
End Sub
Private Sub NewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewToolStripMenuItem.Click
RichTextBox1.Clear()
End Sub
Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
MsgBox("Batch File Maker Created By Roatan Softwares")
End Sub
Labels:
2008,
basic,
batch,
coding,
file maker,
information,
programming,
simple,
system,
tutorials,
visual
Saturday, June 23, 2012
Make Your Computer Beep With Visual Basic 2008
Design
Testing Project
You will need the following:
* 1 Button (Button Has a Hover effect that changes "Click Me!!" to ": D " when hover mouse)
* 1 Button (Button Has a Hover effect that changes "Click Me!!" to ": D " when hover mouse)
Program Codes :
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Console.Beep()
End Sub
Private Sub Button1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseHover
Button1.Text = ":D"
End Sub
Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
Button1.Text = "Click Me!!"
End Sub
End Class
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Console.Beep()
End Sub
Private Sub Button1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseHover
Button1.Text = ":D"
End Sub
Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
Button1.Text = "Click Me!!"
End Sub
End Class
Thursday, June 21, 2012
Simple StopWatch Using Visual Basic 2008
Design
Testing Project
You will need the following:
* 3 Button
* 1 Label
* 3 Button
* 1 Label
* 1 Timer (Interval set @ 1000)
Program Codes :
Public Class Form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label1.Text = Val(Label1.Text) + "01"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled = False
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Label1.Text = "0"
End Sub
End Class
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label1.Text = Val(Label1.Text) + "01"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled = False
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Label1.Text = "0"
End Sub
End Class
Labels:
2008,
basic,
coding,
help,
information,
programming,
school,
simple,
stopwatch,
system,
tutorials,
visual,
webbrowser
Get Your Computer Information Using Visual Basic 2008
Design
Testing Project
You will need the following:
* 5 Textbox
* 6 Labels
* 5 Textbox
* 6 Labels
Program Codes :
Imports System.IO
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = Environment.SystemDirectory.ToString
TextBox2.Text = Environment.OSVersion.ToString
TextBox3.Text = Environment.UserName.ToString
TextBox4.Text = Mid((Environment.TickCount / 3600000), 1, 5) & " :Hours"
TextBox5.Text = Environment.MachineName.ToString
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
End Class
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = Environment.SystemDirectory.ToString
TextBox2.Text = Environment.OSVersion.ToString
TextBox3.Text = Environment.UserName.ToString
TextBox4.Text = Mid((Environment.TickCount / 3600000), 1, 5) & " :Hours"
TextBox5.Text = Environment.MachineName.ToString
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
End Class
Labels:
2008,
basic,
coding,
help,
information,
programming,
school,
simple,
system,
tutorials,
visual,
webbrowser
Subscribe to:
Posts (Atom)