Open webpage in Rhino's webbrowser using .NET


I have not found in the forum how to open the rhino browser with a specific page, only in python here but I have tried to run:

var ps = Rhino.Runtime.PythonScript.Create();
ps.ExecuteScript("import webbrowser;'')");

on a C# component from Grasshopper and it opens my default browser instead of Rhino’s.

So, how do I open a webpage in the Rhino browser using C#?

I think WebBrowser.rhp is in C++, there are any calls from RhinoCommon? if not, can you include it please? And also if you ever upgrade your browser, please include an option to hide its taskbar with the text box. Or even better, allow you to use the control instead of the rhino’s panel.


The WebBrowser plug-in is scriptable, so you can run a script command with RhinoApp.RunScript(...) from your code like so

_-WebBrowser Navigate "" _EnterEnd
1 Like

@dale sorry to label you, I didn’t know who to label to consider this. Wouldn’t it be interesting to take advantage of your WebBrowser so that third party developers can use it within their own plugin panel without the user being able to change the page? Then we could embed web interfaces in Rhino. I mean, you have it already done, but instead of opening it as a panel, include it as a control without the default menu in Rhinocommon, would not be possible?

Hi @Dani_Abalde,

I haven’t thought about providing SDK access to the web browser panel, mostly because it’s so easy to cook one up yourself. Pretty much all the UI tools (MFC, WinForms, WPF, Eto) have access to some kid of web browser control provided by the OS or by download (in the case of Chromium).

– Dale

I had tried several times without success. My case was not simply to open a page, but to run html and javascript using an external library from memory without dependencies. I was preparing a sample file using WebBrowser to show that is not so trivial and found that using the .Navigate() method with URI parameter works as easy as you say. What good news! thanks for giving me a push! :slight_smile: