How can I add a string to my visual basic form?
I'm creating a study application for myself and this is what I have:
Imports System.Diagnostics
Public Class Form1
Dim amounts As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Processes.Tick
Dim proc() As Process = Process.GetProcesses
Dim newproc As New Process
amounts = 0
For Each newproc In proc
If newproc.ProcessName = "firefox" Then
newproc.Kill()
amounts = +1
Else
End If
Next
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
End Class
I'm trying to display a line of text on my form saying.. "Prevented firefox from running X times.
X being my "amounts" variable.
Here's what my form looks like:
So how can I put my amounts variable in place of the X?