Does MS have Edge Object in C# to set up Edge process?

samaliy li 71 Reputation points
2021-06-03T08:54:50.577+00:00

I have a Windows Form Application which is coded in C#. We have the following features in the apl.

When the apl(XX.exe) is started , a windows form apl is opend,and at the sametime ie process is running in background. When click a url link in the windows form apl,this link is opened in InternetExporer.

In my apl ,i used IntenetExplorer Object in SHDocVw.dll to implement the feature.
https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa752084(v=vs.85)

since 2021/6/22 IntenetExplorer will not be supported by ms,I want to use Edge to replace IE to open the link in my apl.

Are there any suggesstions for my purpose? I think SHDocVw.dll doesn't include edge object.
Thank you!

※I have looked for WebView2 for this,I don't know whether it does work.I'm trying on it.

Developer technologies Windows Forms
Microsoft Edge Microsoft Edge development
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2021-06-04T05:26:13.657+00:00

    Hi @samaliy li

    Why doesn't it work with WebView2? Please check that if you have met the pre-requisites of using WebView2. One of the things is that WebView2 requires .NET Framework 4.6.2 or later.

    About your application, how do you use IE in the application? The link you provide is broken. If you're using IE through WebBrowser control, it won't be affected by IE retirement. IE engine MSHTML (Trident) will continue to be supported. You can refer to this official blog for more information.

    102284-image.png

    102285-image.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Regards,
    Yu Zhou

    1 person found this answer helpful.

  2. Hasmukh Ginoya 1 Reputation point
    2021-11-25T16:34:02.627+00:00

    hi @samaliy li
    I am also stuck with the same problem Run Egde Window with IE Mode. After Window Enumeration , I have found IWebBrowser2 Object that is hosted (rendered in Micorosft Edge window).

    When I am maximize the IWebBrowser2 Window , Then Internet Explore Window displayed outside of the Microsoft Edge Window.
    This is my Sample code

    IWebBrowser2 mainWebBrowser= GetWebBrowserFromHtmlWindow(hTMLDocument2);
    InternetExplorer ieobject = mainWebBrowser as InternetExplorer;

    ShowWindow((IntPtr)ieobject.HWND, 3);

    When I Stat Edge with IE Mode then New Internet Explore Process is Start .
    So How can we Find which msedge.exe ( or Its HWND) related to this internet explorer process.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.