Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C#, Process.Start hide?

Tags:

c#

process

public static void Main(string[] args){
    SearchGoogle("Test");
    Console.ReadKey(true);
}

static void SearchGoogle(string t){
    Process.Start("http://google.com/search?q=" + t);
}

Is there any way to hide the browser, so it won't pop up??

like image 429
Mr noob. Avatar asked Nov 29 '22 04:11

Mr noob.


2 Answers

Something like:

ProcessStartInfo startInfo = new ProcessStartInfo("http://google.com/search?q=" + t);
startInfo.WindowStyle = ProcessWindowStyle.Hidden;

Process.Start(startInfo);
like image 87
user243357 Avatar answered Dec 05 '22 17:12

user243357


Perhaps you are looking for ProcessStartInfo.CreateNoWindow ?

like image 32
Ohad Schneider Avatar answered Dec 05 '22 16:12

Ohad Schneider