I want to block all inbound port to do not share my system screen to anyone on network through net monitor for employee configuration in vb.net
i am able to disable ctrl+alt+del but not able to stop screen shearing.
Please help.
What I have tried:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Me.Size = SystemInformation.PrimaryMonitorSize
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Me.Location = New Point(0, 0)
Me.WindowState = FormWindowState.Maximized
'Me.TopMost = True
Me.FormBorderStyle = 0
'Make center all components
'Dim mainScreen As Screen = Screen.FromPoint(Me.Location)
'Dim mywidth = GroupBox1.Width / 2
' Dim myhight = GroupBox1.Height / 2
' Dim X As Integer = (mainScreen.WorkingArea.Width - (mywidth * 2)) / 2 + mainScreen.WorkingArea.Left
' Dim Y As Integer = (mainScreen.WorkingArea.Height - (myhight * 2)) / 2 + mainScreen.WorkingArea.Top
' GroupBox1.Location = New Point(X, Y)
SerialPort1.BaudRate = TextBox1.Text
SerialPort1.Close()
'Disable START Button
Dim process As System.Diagnostics.Process = Nothing
Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = "taskkill.exe"
psi.Arguments = "/F /IM explorer.exe"
process = System.Diagnostics.Process.Start(psi)
'Disable ALT+CTRL+DEL
Timer1.Start()
WebBrowser1.Navigate(New Uri("http://rediff.com"))
End Sub
Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If TextBox1.Text = "1122" Then
Dim process As System.Diagnostics.Process = Nothing
Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = "explorer.exe"
'psi.Arguments = "/F /IM explorer.exe"
process = System.Diagnostics.Process.Start(psi)
Me.Hide()
Application.Exit()
Else
Label1.Text = ("Incorrect Password")
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
For Each selProcess As Process In Process.GetProcesses
If selProcess.ProcessName = "taskmgr" Then
selProcess.Kill()
Exit For
End If
Next
End Sub
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
If (e.CloseReason = CloseReason.UserClosing) Then
e.Cancel = True
MessageBox.Show("Closing of the launcher is not allowed", "Security", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End Sub
End Class