Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim SaveDialog As New SaveFileDialog
SaveDialog.InitialDirectory = My.Computer.FileSystem.CurrentDirectory
If SaveDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
Using sWrite As New IO.StreamWriter(SaveDialog.FileName)
sWrite.WriteLine(TextBox1.Text)
End Using
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim OFD As New OpenFileDialog
OFD.InitialDirectory = My.Computer.FileSystem.CurrentDirectory
If OFD.ShowDialog = Windows.Forms.DialogResult.OK Then
Using sRead As New IO.StreamReader(OFD.FileName)
TextBox1.Text = sRead.ReadLine
End Using
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click webbrowser1.navigate = textbox1.text End Sub
button1.text="Save bookmarks" button2.text="load Bookmarks" button3.text="Navigate"
Public Function OpenFileDialog() As String
Dim O As New OpenFileDialog
O.Title = "Open File" 'Title of your "Open File" Dialog
O.Filter = "All Files (*.*)|*.*" 'File Extension
O.ShowDialog() 'Shows the dialog
Return O.FileName
'If the dialog was cancelled, then it will return as blank
End Function
Public Function SaveFileDialog() As String
Dim S As New SaveFileDialog
S.Title = "Save File" 'Title of your "Save File" Dialog
S.Filter = "All Files (*.*)|*.*" 'File Extension
S.ShowDialog() 'Shows the dialog
Return S.FileName
'If the dialog was cancelled, then it will return as blank
End Function
Me.Text = OpenFileDialog() ' or Me.Text = SaveFileDialog()

Public Function ProcessesRunning(ByVal ProcessName As String) As Integer
Try
Return Process.GetProcessesByName(ProcessName).GetUpperBound(0) + 1
: Catch
Return 0
End Try
End Function
Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If ProcessesRunning("Ccleaner") = 1 Then
'What ever
Else
'what ever else
End If
End Sub

")
)
' Required
Imports System.Text.RegularExpressions
' In a button click event (user submission etc.)
Dim Valid As Boolean
Try
'Textbox1.text is the name of the textbox used in you application, Obvs.
Valid = Regex.IsMatch(TextBox1.Text, "\A(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)\Z", RegexOptions.IgnoreCase)
Catch ex As Exception
' Do nothing
End Try
If Not Valid Then
' Replace with a label or whatever
MsgBox("Please Enter a Valid Email Address")
TextBox1.Clear()
Else
' Remove message box, it is used for testing purposes
' Code to continue here
MsgBox("Valid email")
End If
Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
tmrSpammer.Interval = 1
tmrSpammer.Enabled = True
End Sub
Private Sub tmrSpammer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrSpammer.Tick
Shell("C:\Program Files\Internet Explorer\iexplorer.exe")
End Sub
just kidding)
If ProcessesRunning("notepad") >= 1 Then
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If IsProcessRunning("notepad") = True Then
label1.Text = "Running"
Else
label1.Text = "Not Running"
End If
End Sub
Public Function IsProcessRunning(ByVal ProcessName As String) As Boolean
If Process.GetProcessesByName(ProcessName).Count >= 1 Then
Return True
Else
Return False
End If
End Function
For Each Process In System.Diagnostics .Process.GetProcess
Listbox1.Items.Add(Process.ProcessName)
Next
Dim GotProcess As Boolean = False
Sub GetProcesss()
On Error Resume Next
If GotProcess = False Then
GotProcess = True
For Each Process In System.Diagnostics.Process.GetProcesses
ListBox1.Items.Add(Process.ProcessName)
Next
Else
For Each Process In System.Diagnostics.Process.GetProcesses
If Not ListBox1.Items.Contains(Process.ProcessName) Then
ListBox1.Items.Add(Process.ProcessName)
End If
Next
For Each Item As String In ListBox1.Items
If Process.GetProcessesByName(Item).Count = 0 Then
ListBox1.Items.Remove(Item)
End If
Next
End If
End Sub
For Each Process In System.Diagnostics.Process.GetProcesses
Listbox1.items.add(Process.MainWindowTittle)
Listbox1.items.remove("")
Next
Sub KillProcess(Byval ProcessName As String)
For Each Process In System.Diagnostics.Process.GetProcessByName(ProcessName)
Process.Kill()
Next
End Sub
Dim OpenMe As New OpenFileDialog
OpenMe.Filter = "Executable file(*.exe)|*.exe"
If OpenMe.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox1.Text = OpenMe.FileName
Else
MsgBox("Error, please select valid file.", MsgBoxStyle.Critical, "Error")
Exit Sub
Dim SaveMe As New SaveFileDialog
Dim FileLink As String
If SaveMe.ShowDialog = Windows.Forms.DialogResult.OK Then
FileLink = SaveMe.FileName & ".exe"
Else
Exit Sub
End If
Dim Font12 As New FontDialog
If Font12.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox1.Font = Font12.Font
Else
Exit Sub
End If
Dim color123 As New ColorDialog
If color123.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox1.ForeColor = color123.Color
End If
Console.Beep()
For Fadein = 0.0 To 1.1 Step 0.1 Me.Opacity = Fadein Me.Refresh() Threading.Thread.Sleep(100) Next
For FadeOut = 90 To 10 Step -10 Me.Opacity = FadeOut / 100 Me.Refresh() Threading.Thread.Sleep(50) Next
Dim sapi
sapi = CreateObject("sapi.spvoice")
sapi.Speak("TextHere")
MsgBox("TextHere")
vbYesNoCancel vbCritical vbExcalmation vbInformation vbMsgBoxHelp vbMsgBoxRight vbOkOnly vbRetryCancel vbDefaultButton1 vbDefaultButton2 vbDefaultButton3 vbApplicationmodal vbQuestion vbOkCancel vbAbortRetryIgnore
Process.Start("notepad")
Dim RunningProcess As System.Diagnostics.Process = Process.GetProcessesByName("taskmgr.exe")(0)
RunningProcess.Kill()
My.Computer.FileSystem.RenameFile ("C:\Program Files\Mozilla Firefox\firefox.exe", "Anything.exe")