开发者

Creating a ribbon button to open a browser link

开发者 https://www.devze.com 2023-03-18 02:51 出处:网络
I\'m looking to create a ribbon button for an OL2k10 add-in that opens a开发者_开发百科 specific website.I\'ve only seen references to creating a button using CommandBars, but this is different that w

I'm looking to create a ribbon button for an OL2k10 add-in that opens a开发者_开发百科 specific website. I've only seen references to creating a button using CommandBars, but this is different that what I'd like to accomplish.

Ideas are welcome as usual.


I think here is what you probably can do:

In your ribbon button click event function, you write the following code which would allow you do launch a web browser accessing the given URL, e.g. http://stackoverflow.com

string myURL = "http://stackoverflow.com";
System.Diagnostics.Process.Start(myURL);

Okay, I guess that's pretty much all you need. :)

0

精彩评论

暂无评论...
验证码 换一张
取 消