miércoles, 3 de octubre de 2018

Dejar aplicación en administrador de tareas

 Imports System.Reflection

Private Declare Function ShowWindow Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal nCmdShow As Integer) As Boolean


Public Shared Sub HideWindow()
        Dim SW_HIDE As Integer = 0
        For Each pr As Process In Process.GetProcesses
            If pr.ProcessName.Contains("AcroRd32") Then
                'Int32 hWnd = pr.MainWindowHandle.ToInt32();
                ShowWindow(pr.MainWindowHandle, SW_HIDE)
            End If

        Next
    End Sub


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
      HideWindow()
 End Sub

fuente

No hay comentarios.:

Publicar un comentario