Print Page | Close Window

Need Help to handling Custom Control

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=14268
Printed Date: 16 June 2025 at 4:57am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Need Help to handling Custom Control
Posted By: RedPsyrus
Subject: Need Help to handling Custom Control
Date Posted: 11 May 2009 at 1:50pm
Hi,
I have create a right click menu with a custom Control but I have a problem with it
here is a sample code I use


uploads/20090511_134850_VBHandleMenu.zip - uploads/20090511_134850_VBHandleMenu.zip



thanks




-------------
I'm using visual studio 2008 pro and codejock 12.1.1



Replies:
Posted By: Aaron
Date Posted: 11 May 2009 at 2:33pm
Hi,
 
Maybe you need to put DataGrid in PictureBox or Form and attach PictureBox.hwnd / Form.hwnd?
 
 
 
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: RedPsyrus
Date Posted: 12 May 2009 at 7:09am
Hi,
Thanks to reply Aaron..
I do it with Conteneurs, form and usercontrol,, the same problem
is there another way to bypass it

thanks


-------------
I'm using visual studio 2008 pro and codejock 12.1.1


Posted By: Aaron
Date Posted: 12 May 2009 at 1:50pm
Hi,
 
The only thing I can offer is a working sample in VB code.
 
    Dim Popup As CommandBar
    Dim settingsProperties As CommandBarPopup
    Dim settingsPropertiesHandle As CommandBarControlCustom
       
    If Button = 2 Then
        Set Popup = CommandBars.Add("Popup", xtpBarPopup)
        With Popup.Controls
            Set settingsProperties = .Add(xtpControlButtonPopup, 1, "Settings")
            Set settingsPropertiesHandle = settingsProperties.CommandBar.Controls.Add(xtpControlCustom, 2, "Settings")
                  settingsPropertiesHandle.Handle = picPropertyGridControl.hWnd
        End With
        Popup.ShowPopup
    End If
 
 
Remark:
picPropertyGridControl = Picturebox (with PropertyGrid control on it)
 
 
This produces:
 
 
 
 
Hope this helps you a little
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: RedPsyrus
Date Posted: 13 May 2009 at 12:05pm
hi..
dont work with vb 9 Aaron
thanks for the help



-------------
I'm using visual studio 2008 pro and codejock 12.1.1



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net