none
Opening Object Property Page from Addin/Visual C# RRS feed

  • Question

  • Hello,

    I have written an ActiveX control for Powerpoint, which also includes an Addin that allows you to add the activeX plugin without the Developer Tab.  (see http://social.technet.microsoft.com/Forums/office/en-US/4e36ea4d-2653-4f33-9d6a-b677ae8fe635/adding-a-activex-plugin-to-powerpoint-without-using-the-developer-tab?forum=officegeneral)

    After releasing the mouse and adding the ActiveX plugin onto the Slide, I want the Property Page to come up.  I can get the Property window to come up, but not the Page, like this:

    Application pptApp = Globals.ThisAddIn.Application;

    pptApp.CommandBars.ExecuteMso("ControlProperties");

    I also tried to call an Event inside the ActiveX Plugin, but could not get the Property Page to come up from within the COleControl object.  Oddly enough, I could get the AboutBox to come up by instantiating a CDialog like this:

    CDialog dlgAbout(IDD_ABOUTBOX_MYPLUGIN);

    dlgAbout.DoModal();

    But I couldn't get this to work for the Property Page, since it does a bit more than just a CDialog, and it has its own class from COlePropertyPage.

    I am also curious to know what the property "(Custom)" is in the Properties Window, when its clicked, the Properties Page comes up.  This leads me to believe that I can open the Properties Page by some event (called Custom?).  I tried to do this in the AddIn:

    shape.OLEFormat.Object.Custom()

    But it failed, even though:

    shape.OLEFormat.Object.AboutBox()

    worked, since I have a AboutBox even defined in my IDL, like so:

    [id(DISPID_ABOUTBOX)] voidAboutBox();

    In any case, thanks for your help in advance, much appreciated!

    Blaine


    Blaine Bell


    • Edited by Blaine Bell Tuesday, October 22, 2013 7:58 PM
    Tuesday, October 22, 2013 7:58 PM

All replies

  • Hi Blaine,

    Thank you for posting in the MSDN Forum.

    I'm trying to involve some senior engineers into this issue and it will take some time. Your patience will be greatly appreciated.

    Sorry for any inconvenience and have a nice day!

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, October 24, 2013 1:23 AM
    Moderator
  • Hi,

    The property page is associated with a property rather than the control itself.

    ActiveX control property pages are displayed in two ways:

    • When the control's Properties verb (OLEIVERB_PROPERTIES) is invoked, the control opens a modal property dialog box that contains the control's property pages.
    • The container can display its own modeless dialog box that shows the property pages of the selected control

    For more information, you could refer articles below:

    MFC ActiveX Controls: Property Pages

    Creating Property Pages for ActiveX Controls

    Associating a Property Page with a Property

    By the way, for ActiveX specific questions, I suggest you to post them to Visual C++ forum for more effective response.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, October 25, 2013 1:57 PM
    Moderator
    • When the control's Properties verb (OLEIVERB_PROPERTIES) is invoked, the control opens a modal property dialog box that contains the control's property pages.

    My question is how do you programmatically send this OLEIVERB_PROPERTIES ?  Can I do it from within my AddIn, which is implemented in C#?  I can't find any of this information on the links you posted.

    Thanks,

    Blaine


    Blaine Bell

    Friday, October 25, 2013 3:01 PM