I cannot build my app because it keeps getting errors about the ribbon and when I add a reference to the ribbon the errors go away but I keep getting this errors when I try to build my app.

Sep 14, 2011 at 11:17 PM

I cannot build my app because it keeps getting errors about the ribbon and when I add a reference to the ribbon the errors go away. but I keep getting these errors when I try to build my app. so that makes it impossible to build my app with these errors.
the errors are:

Error 49 'RibbonArrowDirection' is not a member of 'Forms'.

Error 62 'RibbonButtonStyle' is not a member of 'Forms'

Error 48 'RibbonPanelFlowDirection' is not a member of 'Forms'.

Error 30 Type 'System.Windows.Forms.Ribbon' is not defined.

Please Help Me with these errors.

Sep 15, 2011 at 10:05 PM

Did you try setting your framework to 3.5?

What version of vB are you using? 2010 or 2008?

Sep 17, 2011 at 12:14 AM
Edited Sep 24, 2011 at 1:39 AM

yes, I did and I still got errors.

VB 2010.

Edit: It finally worked! I had to downgrade to .net framework 3.5(not the client profile of .net framework 3.5 which is what I had it on.) to get it to work.

Sep 28, 2011 at 3:08 PM

Ah... I should have mentioned that it does not work with the client profile. Sorry!

Oct 8, 2011 at 9:02 AM

Hello guys,

I've tried to use this component and it looks great! I'd like to suggest one little thing that I needed to fix myself... The problem is that lots of users still have .NET2.0 and PMs insist to target 2.0 as the minimum requirement. I kniw this is sad and stupid, but...

Well, to re-compile under 2.0 I needed just to make these cosmetic changes in your code (locally fixed about 20 lines of code):

- remove all mentions of using Linq

- change IEnumerable<RibbonItem> Items to List<RibbonItem>

- change Count() to Count and ElementAt(i) to [i]

That's it... Your project is now gets compatibility with 2.0 and even more - with ClientProfile of 3.5 and 4.0!

Oct 8, 2011 at 2:10 PM

Thanks! I'll put that in as a bug! Would you care to join?

Oct 8, 2011 at 6:20 PM

Thanks for invitation, I'd be glad to join as a follower. I'm quite interested in using this component so if I come up with some ideas or code fixes, I'll place it somewhere here.

For now, some few more notes I can make right for the moment:

- I've played a bit with unchanged sources and noticed, that if I retarget it to .Net 4.0 (Full), I get critical error just after start, in this line:

if (Handle == 0) throw new Win32Exception(Marshal.GetLastWin32Error()); (it's GlobalHook.InstallHook())

The error reads as "invalid window descriptor" (sorry for back-translating error message from the localized one). After re-compiling for 3.5, again, it starts without troubles.

Just the same, VS2010 has troubles opening demo forms in designer. It says:

"Object of type 'System.String' cannot be converted to type 'System.Drawing.Image'"

call stack:

at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
at System.ComponentModel.ReflectPropertyDescriptor.ResetValue(Object component)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.ResetBrowsableProperties(Object instance)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)

If I create my own form from scratch and put the ribbon here, it works nice though.


And yes, I was a bit (well, not a *bit*) inaccurate, saying that after re-compiling for 2.0 it will start in Client profile (I made this conclusion after changing config manually - probably I missed something...). But I'll try to look if it is feasible to make "client" versions of components by conditionally commenting-out all mentions of "System.Design" namespace members.

Oct 8, 2011 at 6:49 PM

ps: hope this helps:


This article shows how to make your components "client-profile oriented". The changes are straight-forward:

- separate all design-time components (....Designer, .....Editor, .....Glyph) to another dll

- change all Designer annotations like this: "[Designer("RibbonButtonDesigner, name-of-design-time-library")]"

The benefit is that the runtime part will compile under Client Profile, and it will be much smaller.

Oct 8, 2011 at 8:52 PM

Glad you enjoy this project. Would you mind uploading your changes and improvements? I am not a good developer. :) I know some things in VB - no C#. I liked this project, and it needed some attention and some reorganization. I am not the developer - just the organizer... I appreciate your interest.


Oct 9, 2011 at 7:27 AM

Last evening I've played a bit with your sources (since I'm not deeply into them, my changes were rather formal, and I didn't have time to test the result, except just running test-app under different frameworks).

I think I've managed to separate runtime and design parts, which gives ability to use ribbon under any framework (including 2.0, 3.5 client profile and so on). I attached my variant in the issue-tracker thread. Hope my contribution will be of use.

Oct 17, 2011 at 6:35 PM