첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

■ Process 클래스를 사용해 크롬 브라우저에서 구글 검색을 하는 방법을 보여준다.

TestProject.zip
0.00MB

▶ Program.cs

using System.Diagnostics;

namespace TestProject;

/// <summary>
/// 프로그램
/// </summary>
class Program
{
    //////////////////////////////////////////////////////////////////////////////////////////////////// Method
    ////////////////////////////////////////////////////////////////////////////////////////// Static
    //////////////////////////////////////////////////////////////////////////////// Private

    #region 프로그램 시작하기 - Main()

    /// <summary>
    /// 프로그램 시작하기
    /// </summary>
    private static void Main()
    {
        string keyword = "DevExpress GridControl 클래스";

        Process process = new Process();

        process.StartInfo.FileName  = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
        process.StartInfo.Arguments = $"--profile-directory=\"Profile 6\" \"https://www.google.com/search?q={keyword}\"";

        process.Start();
    }

    #endregion
}
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요