![]() |
AddSystemButton problem in .NET/C# and VB |
Post Reply ![]() |
Author | |
SBK2K ![]() Newbie ![]() Joined: 04 October 2005 Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() 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...
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
gaudetm ![]() Senior Member ![]() ![]() Joined: 23 September 2006 Location: Canada Status: Offline Points: 134 |
![]() ![]() ![]() ![]() ![]() |
put the icon in the form icon need to convert it and use only 32x32 size icon, look better
|
|
![]() |
|
SBK2K ![]() Newbie ![]() Joined: 04 October 2005 Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() |
I pasted my code; exactly what I did. Where is IssueTrak and how do I submit it?
Cheers.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |