Jump to content
Sign in to follow this  
programadorvb6

ANSWERED Como fechar janela do Microsoft Edge

Recommended Posts

programadorvb6

Como fechar todas as janelas que estejam abertas no Microsoft Edge?
Fiz um código assim mas não deu para as fechar.
 

 Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName("iexplore")

        For Each p As Process In pProcess
            p.Kill()
        Next
        Me.Close()
    End Sub

Grato pela vossa atenção.

 

Edited by programadorvb6

Share this post


Link to post
Share on other sites
programadorvb6
   ' Fecha Microsoft Edge
        Dim Edge As Process() = Process.GetProcessesByName("MicrosoftEdge")
        For Each Item As Process In Edge
            Try
                Item.Kill()
                Item.WaitForExit(3000)
            Catch generatedExceptionName As Exception
            End Try
        Next
        Me.Close()

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.