Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - AddSystemButton problem in .NET/C# and VB
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

AddSystemButton problem in .NET/C# and VB

 Post Reply Post Reply
Author
Message
SBK2K View Drop Down
Newbie
Newbie


Joined: 04 October 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote SBK2K Quote  Post ReplyReply Direct Link To This Post Topic: AddSystemButton problem in .NET/C# and VB
    Posted: 15 November 2006 at 8:15am
Hi,

I've tried to add a system button using AddSystemButton to a ribbon bar. I've looked at the samples and no doubt I'm missing something small, and I've also copied the example from the help file and it still isn't working.
 
My code:
 
CommandBars.Icons.LoadBitmap "C:\Program Files\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v10.3.1 (30 Day Trial)\samples\CommandBars\C#.NET\RibbonSample\res\shiny-gear.png", 99, xtpImageNormal
    Dim RibbonBar As RibbonBar
    Set RibbonBar = CommandBars.AddRibbonBar("The Ribbon")
    RibbonBar.EnableDocking xtpFlagStretched
    Dim ControlFile As CommandBarPopup
    Dim Control As CommandBarControl
    Set ControlFile = RibbonBar.AddSystemButton()
    ControlFile.IconId = 99
    With ControlFile.CommandBar.Controls
        .Add xtpControlButton, ID_FILE_NEW, "&New"
        .Add xtpControlButton, ID_FILE_OPEN, "&Open..."
        .Add xtpControlButton, ID_FILE_SAVE, "&Save"
        .Add xtpControlButton, ID_FILE_SAVE_AS, "Save &As..."
        Set Control = .Add(xtpControlButton, ID_FILE_PRINT, "&Print")
        Control.BeginGroup = True
        .Add xtpControlButton, ID_FILE_PRINT_PREVIEW, "Print Pre&view"
        .Add xtpControlButton, ID_FILE_PRINT_SETUP, "Pr&int Setup..."
        Set Control = .Add(xtpControlButton, ID_FILE_MRU_FILE1, "Recent File")
        Control.BeginGroup = True
        Control.Enabled = False
        Set Control = .Add(xtpControlButton, ID_APP_EXIT, "E&xit")
        Control.BeginGroup = True
    End With
This adds the System Menu but there is no icon. The icon is definatley loading correctly because I can assign it to a menu item.
 
This is really frustrating...
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 15 November 2006 at 9:46am
Hi,
It works in all our samples. Think you do something wrong.
Attach project in issuetrack to show what you do.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
gaudetm View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 September 2006
Location: Canada
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote gaudetm Quote  Post ReplyReply Direct Link To This Post Posted: 17 November 2006 at 10:25am
put the icon in the form icon need to convert it and use only 32x32 size icon, look better
Back to Top
SBK2K View Drop Down
Newbie
Newbie


Joined: 04 October 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote SBK2K Quote  Post ReplyReply Direct Link To This Post Posted: 18 November 2006 at 1:49am
I pasted my code; exactly what I did. Where is IssueTrak and how do I submit it?
 
Cheers.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.