![]() |
[solved] RibbonSample vb.net not working in VS2017 |
Post Reply ![]() |
Author | |
achar ![]() Groupie ![]() Joined: 12 April 2018 Status: Offline Points: 10 |
![]() ![]() ![]() ![]() ![]() Posted: 12 April 2018 at 10:04am |
I try to run a sample for the ribbon found in:
C:\Program Files (x86)\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v18.3.0\Samples\CommandBars\VB.NET\RibbonSample When I hit run, i get the following error: System.NullReferenceException: 'Object reference not set to an instance of an object.' found at: Private Sub CommandBars_ResizeClient(ByVal sender As Object, ByVal e As AxXtremeCommandBars._DCommandBarsEvents_ResizeClientEvent) Handles CommandBars.ResizeClient Refresh() End Sub among other "Exception thrown: 'System.NullReferenceException' in RibbonSample.exe" It must be something very obvious, but I cannot get it to work. It migrated from a previous version, but I don't think this is the issue. Any ideas?
|
|
![]() |
|
olebed ![]() Admin Group ![]() Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
Hello,
Make sure older versions of SuitePro uninstalled and unregistered properly. Also try to change in Configuration Manager Platform from "Any CPU"/"x64" to x86 then rebuild solution. Regards, Oleksandr Lebed |
|
![]() |
|
achar ![]() Groupie ![]() Joined: 12 April 2018 Status: Offline Points: 10 |
![]() ![]() ![]() ![]() ![]() |
Thank you for your reply,
I did all that but the problem remains. Actually, the program crashes alltogether when I run it ("RibbonSample has stopped working"), and I cannot find the point where it crashes to put a breakpoint. It seems this happens when the window tries to paint the Ribbon. EDIT: After modifying a RibbonSample a lot, and randomly playing around with configurations, I found that commenting out the following snippet in the CreateRibbonBar() method allows the program to start, although the ribbon is probably not drawn properly: 'this crashes 'ControlFile = RibbonBar.AddSystemButton() 'ControlFile.IconId = ID_SYSTEM_ICON 'ControlFile.Caption = "&File" 'ControlFile.Style = XtremeCommandBars.XTPButtonStyle.xtpButtonCaption 'CreateBackstageView() |
|
![]() |
|
olebed ![]() Admin Group ![]() Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
Try to run C# RibbonSample.
|
|
![]() |
|
achar ![]() Groupie ![]() Joined: 12 April 2018 Status: Offline Points: 10 |
![]() ![]() ![]() ![]() ![]() |
I get the following error:
System.Runtime.InteropServices.COMException: 'Class is not licensed for use (Exception from HRESULT: 0x80040112)' at frmMain.cs private void CommandBars_ResizeClient(object sender, AxXtremeCommandBars._DCommandBarsEvents_ResizeClientEvent e) { Refresh(); <<<<<<here } I have installed the whole bundle normally, and I have worked with other controls such as chart, datepicker, etc without any problems.
|
|
![]() |
|
olebed ![]() Admin Group ![]() Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
Hello,
I can't find any similar problems on our support site or this forum. Problem can be in some little detail. Please create support ticket on support.codejock.com (see this page https://www.codejock.com/support/) Then we can contact by TeamViewer. Regards, Oleksandr Lebed |
|
![]() |
|
achar ![]() Groupie ![]() Joined: 12 April 2018 Status: Offline Points: 10 |
![]() ![]() ![]() ![]() ![]() |
I am aware that there are no similar problems in the forum, which probably means that it is something stupid on my part.
I have just found that running the sample in situ (C:\Program Files (x86)\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v18.3.0\Samples\CommandBars\VB.NET\RibbonSample) works OK!!! But if I copy the whole RibbonSample folder in a temp folder (which I have done so far for backup reasons - it migrates from a previous version), the project compiles successfully but doesn't work as described earlier. Is this any help?
|
|
![]() |
|
olebed ![]() Admin Group ![]() Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
I have found reason.
System.NullReferenceException is about missing theme DLL. They allocated in c:\Program Files (x86)\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v18.3.0\Samples\Styles\ you can just change method StylesPath() in frmMain.vb to get correct path and copy that DLLs to correct path. |
|
![]() |
|
achar ![]() Groupie ![]() Joined: 12 April 2018 Status: Offline Points: 10 |
![]() ![]() ![]() ![]() ![]() |
That was it, thank you!
|
|
![]() |
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 |