UtilUIAutomationSetWindowState(Int32, ProcessWindowStyle) Method
Set the visibility state of a window.
Namespace: DevCase.Core.Diagnostics.ProcessesAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static bool SetWindowState(
int pid,
ProcessWindowStyle state
)
Public Shared Function SetWindowState (
pid As Integer,
state As ProcessWindowStyle
) As Boolean
Dim pid As Integer
Dim state As ProcessWindowStyle
Dim returnValue As Boolean
returnValue = UtilUIAutomation.SetWindowState(pid,
state)
public:
static bool SetWindowState(
int pid,
ProcessWindowStyle state
)
static member SetWindowState :
pid : int *
state : ProcessWindowStyle -> bool
No code example is currently available or this language may not be supported.
- pid Int32
-
The process id. (PID).
- state ProcessWindowStyle
-
The window state.
Boolean
If the window was previously visible, the return value is
.
If the window was previously hidden, the return value is
.
This is a code example.
No code example is currently available or this language may not be supported.
Dim p As New Process
p.StartInfo.FileName = "CMD.exe"
p.StartInfo.UseShellExecute = False
p.StartInfo.WindowStyle = ProcessWindowStyle.Normal
p.Start()
p.WaitForInputIdle()
SetWindowState(p.Id, ProcessWindowStyle.Hidden)
If MessageBox.Show("Kill Notepad.exe process?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
p.Kill()
End If
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
InvalidEnumArgumentException
|
state
|