Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Commndbar nullreferenceexception
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Commndbar nullreferenceexception

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


Joined: 28 December 2019
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote florentsegui Quote  Post ReplyReply Direct Link To This Post Topic: Commndbar nullreferenceexception
    Posted: 28 January 2020 at 3:21pm
Hello,

I'm trying to use the commandbar control on a MDI Child in VB.NET.
I've got two commandbar controls:
- one on the MDI Container form
- one on the MDI Child form

On the parent, everything is OK. I can add commandbars, contextmenus...
On the child, I've a null reference exception as soon as I try to add something...

I'm using Codejock 19.1 and VS2017 (NET 4.7.2)

If I do this:
Dim test As TestForm
test = New TestForm()
test.MdiParent = Me
test.AxCommandBars1.ContextMenus.Add(500, "test")

I've a nullreferenceexception

If I do this:
Dim test As TestForm
test = New TestForm()
test.AxCommandBars1.ContextMenus.Add(500, "test")

All is OK
How can I use a commandbar on a MDI Child?  

Thanks
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.125 seconds.