hello guys,
this is my first post asking for a help. Actually i am a PHP/Mysql developer.
i am newbie to vb.net and i am trying to develop a application which asks for a password when the user tries to open any.exe file
for example:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim InternetExplorer() As Process = Process.GetProcessesByName("iexplore")
For Each Process As Process In InternetExplorer
Process.Kill()
timer1.enabled = true
Next
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Try
Dim InternetExplorer() As Process = Process.GetProcessesByName("iexplore")
For Each Process As Process In InternetExplorer
Process.Kill()
Next
End Sub
All this does is kills the specified process and avoids further opening of the same process by starting a timer. This works fine as i need. But what i need is that ,when a user tries to open the same killed process a form should open and ask for a password.if password is correct set timer to stop and open the process ,else if the password is not correct the timer should be enabled and the killing process should continue.Also i want to add that the form which asks for password should be visible only when an instance of a process(in this case IE) is being tried to open.
Any help would be greatly thankful...