how to hide maximize button from ribbon control of dotnetbar library for Visual Basic .NET

I would like to know if somebody know how to hide just the "maximize button" from the ribbon control of the dotnetbar library for visual basic .net???

I found this code on google, but this code hide all buttons in the tittle bar
Dim sysItems As ArrayList = ribbonControl1.RibbonStrip.GetItems("", GetType(SystemCaptionItem))
Dim item As SystemCaptionItem
 
For Each item In sysItems
   If Not item.IsSystemIcon Then
      item.Visible = False
   End If
Next

Open in new window

altariamx2003Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

larkvaleCommented:

In the form which contains the ribbon control set the MaximizeBox property to False
altariamx2003Author Commented:
I do that but, that only disabled the maximize button of the form, not the maximize button created by the ribbon control of the dotnetbar library
altariamx2003Author Commented:
The maximize button that i need to hide is the button created with the "ribbon control" of the dotnetbar library
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

CodeCruiserCommented:
Within this check

If Not item.IsSystemIcon Then

add another check but you would have to do some exploration to determine whether the current item is a maximize button. So for example (just a demo not sure if it would work)

For Each item In sysItems
   If Not item.IsSystemIcon Then
      If item.Name = "Maximize" Then
         item.Visible = False
         Exit For
      End If
   End If
Next
altariamx2003Author Commented:
I dont know which item is the maximize button, my boss bought this library for me.

And I dont know anything about this library

CodeCruiserCommented:
Does the intellisense not show the properties of the Item?
altariamx2003Author Commented:
this are the properties of item

image1
image2
 image3
 image4
 image5
 image6
 image7
CodeCruiserCommented:
Hmm Nice. Try adding a msgbox to show the Text and Name of each item and see if what's the text/name of the maximize button and then use that in the if condition.
altariamx2003Author Commented:
item.name and item.text shows empity values
larkvaleCommented:
I am not sure what you mean by the Maximize button on the Ribbon control.

1. Do you mean the "Maximze / Minimize the Ribbon" or do you mean the button that maximizes the whole form, ?

2. Can you send a screen shot and point out which button you want to hide ?

3. What class is your form derived from ? it shouild be
                                 Inherits DevComponents.DotNetBar.Office2007Form




CodeCruiserCommented:
Also try the ID and Command properties.
altariamx2003Author Commented:
im gonna try with the suppliers of the library

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
altariamx2003Author Commented:
Im gonna try with the supliers of the library
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.