ProcessStartInfo.WindowStyle 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
프로세스가 시작될 때 사용할 창 상태를 가져오거나 설정합니다.
public:
property System::Diagnostics::ProcessWindowStyle WindowStyle { System::Diagnostics::ProcessWindowStyle get(); void set(System::Diagnostics::ProcessWindowStyle value); };
public System.Diagnostics.ProcessWindowStyle WindowStyle { get; set; }
member this.WindowStyle : System.Diagnostics.ProcessWindowStyle with get, set
Public Property WindowStyle As ProcessWindowStyle
속성 값
최대화, 최소화, 표준(최대화되거나 최소화되지 않은) 또는 표시되지 않는 창 중 어느 상태에서 프로세스가 시작되는지 나타내는 열거형 값 중 하나입니다. 기본값은 Normal
입니다.
예외
창 스타일이 ProcessWindowStyle 열거형 멤버 중 하나가 아닌 경우
예제
#using <System.dll>
using namespace System;
using namespace System::Diagnostics;
using namespace System::ComponentModel;
// Opens the Internet Explorer application.
void OpenApplication(String^ myFavoritesPath)
{
// Start Internet Explorer. Defaults to the home page.
Process::Start("IExplore.exe");
// Display the contents of the favorites folder in the browser.
Process::Start(myFavoritesPath);
}
// Opens urls and .html documents using Internet Explorer.
void OpenWithArguments()
{
// URLs are not considered documents. They can only be opened
// by passing them as arguments.
Process::Start("IExplore.exe", "www.northwindtraders.com");
// Start a Web page using a browser associated with .html and .asp files.
Process::Start("IExplore.exe", "C:\\myPath\\myFile.htm");
Process::Start("IExplore.exe", "C:\\myPath\\myFile.asp");
}
// Uses the ProcessStartInfo class to start new processes,
// both in a minimized mode.
void OpenWithStartInfo()
{
ProcessStartInfo^ startInfo = gcnew ProcessStartInfo("IExplore.exe");
startInfo->WindowStyle = ProcessWindowStyle::Minimized;
Process::Start(startInfo);
startInfo->Arguments = "www.northwindtraders.com";
Process::Start(startInfo);
}
int main()
{
// Get the path that stores favorite links.
String^ myFavoritesPath = Environment::GetFolderPath(Environment::SpecialFolder::Favorites);
OpenApplication(myFavoritesPath);
OpenWithArguments();
OpenWithStartInfo();
}
using System;
using System.Diagnostics;
using System.ComponentModel;
namespace MyProcessSample
{
class MyProcess
{
// Opens the Internet Explorer application.
void OpenApplication(string myFavoritesPath)
{
// Start Internet Explorer. Defaults to the home page.
Process.Start("IExplore.exe");
// Display the contents of the favorites folder in the browser.
Process.Start(myFavoritesPath);
}
// Opens urls and .html documents using Internet Explorer.
void OpenWithArguments()
{
// url's are not considered documents. They can only be opened
// by passing them as arguments.
Process.Start("IExplore.exe", "www.northwindtraders.com");
// Start a Web page using a browser associated with .html and .asp files.
Process.Start("IExplore.exe", "C:\\myPath\\myFile.htm");
Process.Start("IExplore.exe", "C:\\myPath\\myFile.asp");
}
// Uses the ProcessStartInfo class to start new processes,
// both in a minimized mode.
void OpenWithStartInfo()
{
ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
startInfo.WindowStyle = ProcessWindowStyle.Minimized;
Process.Start(startInfo);
startInfo.Arguments = "www.northwindtraders.com";
Process.Start(startInfo);
}
static void Main()
{
// Get the path that stores favorite links.
string myFavoritesPath =
Environment.GetFolderPath(Environment.SpecialFolder.Favorites);
MyProcess myProcess = new MyProcess();
myProcess.OpenApplication(myFavoritesPath);
myProcess.OpenWithArguments();
myProcess.OpenWithStartInfo();
}
}
}
Imports System.Diagnostics
Imports System.ComponentModel
Namespace MyProcessSample
Class MyProcess
' Opens the Internet Explorer application.
Public Sub OpenApplication(myFavoritesPath As String)
' Start Internet Explorer. Defaults to the home page.
Process.Start("IExplore.exe")
' Display the contents of the favorites folder in the browser.
Process.Start(myFavoritesPath)
End Sub
' Opens URLs and .html documents using Internet Explorer.
Sub OpenWithArguments()
' URLs are not considered documents. They can only be opened
' by passing them as arguments.
Process.Start("IExplore.exe", "www.northwindtraders.com")
' Start a Web page using a browser associated with .html and .asp files.
Process.Start("IExplore.exe", "C:\myPath\myFile.htm")
Process.Start("IExplore.exe", "C:\myPath\myFile.asp")
End Sub
' Uses the ProcessStartInfo class to start new processes,
' both in a minimized mode.
Sub OpenWithStartInfo()
Dim startInfo As New ProcessStartInfo("IExplore.exe")
startInfo.WindowStyle = ProcessWindowStyle.Minimized
Process.Start(startInfo)
startInfo.Arguments = "www.northwindtraders.com"
Process.Start(startInfo)
End Sub
Shared Sub Main()
' Get the path that stores favorite links.
Dim myFavoritesPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Favorites)
Dim myProcess As New MyProcess()
myProcess.OpenApplication(myFavoritesPath)
myProcess.OpenWithArguments()
myProcess.OpenWithStartInfo()
End Sub
End Class
End Namespace 'MyProcessSample
적용 대상
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET