Unfortunately, it does not look like the Windows API code package was designed to satisfy. This library is all about taking shell concepts and bringing them into managed code. At the API level, it is technically independent of the βrealβ Windows shell, so it can be implemented using a different data provider than the actual COM shell APIs. To this end, the ability to "return" to the native shell is difficult, since there can be no native shell to go back (hypothetically speaking, of course, I do not know anyone doing an alternative implementation). In this regard, the library seems to consider itself an extension Framework class libraries (which is probably true since some functions, such as JumpList ) ended up in the main libraries).
Please note that I can not speak for the authors of the library, the above is purely speculation based on the structure of the library and my experience with other .NET libraries from Microsoft. But whatever the reason, this functionality does not seem to exist.
What exists is the ability to create your own Explorer window using the ExplorerBrowser control (or WPF shell). See the ExplorerBrowser sample that comes with the library for an example. I can not say that I recommend trying to simulate Explorer, although even with these helpers.
For your specific problem of launching the search box, I would recommend looking into search: protocol and see if it matches your needs. It does not have a good object model for presenting queries, so you will either have to do it yourself (or find it, it can exist), or just work with strings. But he is very flexible.
Your specific problem, as stated above, can be implemented as:
string folder = Uri.EscapeDataString(@"C:\Users\ILIANHOME\Downloads"); string file = '"' + Uri.EscapeDataString(textBox2.Text) + '"'; string uri = "search:query=filename:" + file + "&crumb=location:" + folder; Process.Start(new ProcessStartInfo(uri));
source share