3

I have downloaded the official office 2007 UI ribbon .dll, but now what? I am coding in VB.net. I do not know where to place this .dll, and I do not see any additional controls anywhere at all. The readme explains how to license your copy, which I have done.

Now what? I am hoping to magically see the ribbon control in the list of components I can add somewhere, but its just not there....

Is there even a way to use this as a drag-n-drop component with the WYSIWYG Design View?

EDIT: To clarify, my goal is to use the Ribbon in my own work, not to modify the Office ribbon or to develop a plugin for it. I cannot find any free ribbon anywhere, and I am not sure if this .dll I have is what I need.

Cyclone
  • 17,939
  • 45
  • 124
  • 193
  • Do you want to customize the Office ribbon UI or create a ribbon in your own application? – Dirk Vollmar Aug 18 '09 at 18:36
  • Create a ribbon in my own application, preferably being able to use the Design view. – Cyclone Aug 18 '09 at 18:37
  • Wow... remember when you were at this level? Everything was a struggle and you only knew enough to know how amazingly clueless you were. Wait, I'm still like that now. Never mind. –  Aug 18 '09 at 18:38
  • I *am* at this level lol. Why else would I be here now :P – Cyclone Aug 18 '09 at 18:49

4 Answers4

3

I'd suggest the following alternative to the Microsoft ribbon:

A Professional Ribbon You Will Use (Now with orb!)

There have been discussions here on SO about the licensing required for use of the Office ribbon.

To begin using, first add a reference to the DLL in your solution:

  1. In VS, right click your WinForm project and select Add Reference...
  2. On the Add Reference dialog, select the Browse tab and navigate to and select the DLL.
  3. Click OK on the Add Reference dialog.

To use the Ribbon check out the tutorial here.

Also, the Ribbon's author opened a CodePlex project for the component here.

Edit: Problems adding controls to the Ribbon.

The instructions found on the Getting Started page worked for me when I last played with the ribbon, but they don't now. Maybe it's the version of Visual Studio I'm using (I believe I was using VS2005 Pro then, now I'm using VS2008 Pro).

In VS 2008 I was able to add controls to the RibbonPanel by using the Panel's Items property. Here's how:

  1. Add a Ribbon to your form.
  2. Add a Panel to the Ribbon by clicking the 'Add Panel' icon on the Ribbon.
  3. Select the Panel you just added and select 'Items' from the Panel's property screen.
  4. On the RibbonButton Collection Editor screen click Add (or select a specific control from the Add button's drop down list). Be sure to set your new control's properties on the properties side of this dialog.
  5. Click the OK button on the Editor screen.

The component was pretty flaky in the designer:

  • Controls added did not appear until I closed the designer and reopened it.
  • Controls deleted through the designer did not clean out the code associated with the Ribbon controls (I had to delete all lines associated with the Ribbon controls in the forms .Designer.vb file).
Community
  • 1
  • 1
Jay Riggs
  • 53,046
  • 9
  • 139
  • 151
  • The question is... would you use a control written by Poo? –  Aug 18 '09 at 18:42
  • My problem lies with language, I am coding in vb.net, not c#. I have encountered this ribbon previously and have used it in c# projects, but now I need a .net one... – Cyclone Aug 18 '09 at 18:48
  • The control itself is written in C#, but you can still use it (packaged in a DLL) in VB.net. – Jay Riggs Aug 18 '09 at 18:51
  • How do I do so? Can you explain? Can I use it in Design View even with vb.net? – Cyclone Aug 18 '09 at 18:52
  • I have a copy of the compiled ribbon .dll now. Where does it go, and how can I use it? – Cyclone Aug 18 '09 at 19:03
  • Okay, thanks! Do I need to include a copy of the .dll with my project? – Cyclone Aug 18 '09 at 19:50
  • Thanks! Once I have added the .dll as a reference, how do I set the path on the end-user's computer where it will be found? For example, I am going to have it located inside a folder where the .exe is located, do I type the relative path? – Cyclone Aug 18 '09 at 21:02
  • Under the simplest case, you can just copy your exe and the DLL to a folder on a client machine and everything should work (assuming no other dependencies, such as third party components installed on your development machine and not on the client machine, etc). The .NET Framework allows for a number of ways to deploy assemblies. The simplist case I described is called XCOPY, you might want to research others. – Jay Riggs Aug 18 '09 at 21:42
  • I'll try it out. Thanks! You have been a huge help! – Cyclone Aug 18 '09 at 22:32
  • Unfortunately the ribbon control doesn't work...I cannot add anything to the panels, and the deletion of the control crashes the IDE. I am using Visual Basic Express 2008 w/ SP1. – Cyclone Aug 18 '09 at 23:25
  • 1
    I tested and had many of the same problems you did. I edited my response with a fix that will hopefully work for you. – Jay Riggs Aug 19 '09 at 19:48
  • I still cannot add any code to any of these components >.> Still, its better than nothing lol....Ill make it work somehow... – Cyclone Aug 19 '09 at 19:54
  • If you follow my new instructions, I'd hope you'd be able to at least add controls to the Ribbon. To add events to the controls (Click etc.) I found you need to select the control, and in the control's Property screen select Events. Double click the event you want to 'wire' and it will be created for you in the code. – Jay Riggs Aug 19 '09 at 20:03
  • I can add controls, yup! Now I can add code, thanks! I just wish the guy that made this made it work with vb.net 2008 lol. Its really a hassle to use, but it looks really nice. – Cyclone Aug 19 '09 at 20:04
  • Good! It is a bit of a hassle. I guess I didn't play with this control as much as I thought I did when I first found it. Had I encountered the number of problems we encountered, I might not have recommended it! – Jay Riggs Aug 19 '09 at 20:12
  • Its still awesome though, thanks! If only the author would respond to my emails >.> – Cyclone Aug 19 '09 at 20:57
1

I'd wager that DLL is for authoring plugins that interact with the ribbon. As far as I know, Office 2007's UI is not for you, or anybody outside of MS, to use in our own projects. Unlike the standard controls they ship with visual studio.

There is a WPF version available, however. I don't think we'll see a Windows Forms version from MS available for free.

1

A quick googling turns out Ribbon UI Control Roundup for Developers , which should cover your needs.

Adriano Varoli Piazza
  • 7,297
  • 5
  • 39
  • 50
0

Assuming that you downloaded the WPF Ribbon Preview from CodePlex you will find further documentation here:

A Ribbon Feature Walkthrough presents the features available within the WPF ribbon class library and this Hands-on-Lab will provide you with exercises to get started creating your own ribbon. The examples in these exercises are in C#, but maybe they are still helpful if you want to create your ribbon using VB.Net.

Dirk Vollmar
  • 172,527
  • 53
  • 255
  • 316