Control's property pages at runtime???

I am currently implementing an ActiveX control with Measurement Studio for Visual Basic.
Everything is going fine, but I have one general problem which I cannot solve. The control should show the own property pages at runtime mode. Whit one OLE control, developed under visual c++ or ATL this is strength forward. But I have no idea how to do this from Visual Basic. I spend a lot of time to search in internet but unfortunately there is no information at all.
Please HELP!
Thanks in advance!
Nikolai

You can do this with the ISpecifyPropertyPages COM interface and the OleCreatePropertyFrame function. The hard part is getting definitions of the interface, interface methods, supporting data types, etc. that you can use from VB. Here's one way to do it:
Download tl_ole.zip, which is a type library that contains definitions for several OLE interfaces, structures, and functions.
Create a new VB project and add a reference to the type library.
Add a Measurem
ent Studio ActiveX control (i.e., CWGraph) to the form and add a button to the form.
Add the following code to your VB project:
Private Sub Command1_Click()
ShowPropertyPages CWGraph1.Object, "Graph", Me.hWnd
End Sub
Public Sub ShowPropertyPages(comObject As Object, name As String, hWnd As Long)
Dim specifyPages As ISpecifyPropertyPages
Set specifyPages = comObject
If Not specifyPages Is Nothing Then
Dim pages As CAUUID
specifyPages.GetPages pages
OleCreatePropertyFrame hWnd, 0, 0, name, 1, comObject, pages.cElems, ByVal pages.pElems, 0, 0, 0
CoTaskMemFree pages.pElems
End If
End Sub
Note that you pass in the Object property of the control, not the control reference itself. When you run this code, this will bring up the property pages of the controls at run-time. If you make any changes in the property pages and click OK, the changes will be reflected in the control.
Hop
e this helps.
- Elton

Similar Messages

  • How to find out which data control do the page layout components come from?

    hi,
    work in Jdev 11.1.2.3
    After have drag and drop data control into pages designer, how to find out which data control do the page layout component (such as a field in form layout) come from?
    --i cannot find data control related information in the property pallete for the page layout component.
    Regards.

    This information can be found in the page definition file.
    Select the field in the page and then click the binding tab.

  • How to access another control in a page in another xaml file?

    I have a XAML page name GameMainSP.xaml. Can I access a control in that page from a module in the project? I was only trying to change a text block controls Text property. Is this possible?
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering
    - Yoda. Blog - http://www.computerprofessions.co.nr

    I have a XAML page name GameMainSP.xaml. Can I access a control in that page from a module in the project? I was only trying to change a text block controls Text property. Is this possible?
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering
    - Yoda. Blog - http://www.computerprofessions.co.nr
    Nevermind, I managed to figure out what was the problem. I needed to provide a reference to the page.
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering
    - Yoda. Blog - http://www.computerprofessions.co.nr

  • Tab control with 2 pages

    I want to create a Tab control with 2 pages, in each page there are 2 buttons - "OK" and "Cancel".
    If on Page1, "OK" is clicked, Page2 will be disable and greyed, until "Cancel" is clicked. And vice-versa for Page2 buttons.
    How to do this?
    Thanks in advance...
    Solved!
    Go to Solution.

    Hi Splee,
    Please view the attached vi, I believe it's doing what you've asked. You can invoke properties using property node in order to change the value of variables.
    Hi Simply_me check your Vi will it really works. To make this VI in working condition you have to do some more coding in your code.
    Check your page selection technique.
    Hi Splee,
    First you have to find out on which Tab Page user clicking the buttons, the all operations you have to do on other page.
    Once your page is disable you can't access the controls of that page. As Geeta says make a code using event structure with Tab Control property and invoke nodes. 
    You have to do some coding to achieve your requirements.
    Thanks and Regards
    Himanshu Goyal
    Thanks and Regards
    Himanshu Goyal | LabVIEW Engineer- Power System Automation
    Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
    It Only gets BETTER!!!

  • Minimum privileges needed to create a new page at runtime

    Some body know the minimum privileges needed by a user to create a new page at runtime (using PORTAL.WWSBR_API.add_folder). Actualy the user have MANAGE_CONTENT on the parent page where the page need to be create by we got an exception (If we had the MANAGE_CONTENT on the page group, we dont receive this exception)
    thanks
    J.
    Message was edited by:
    user510720

    You'll need to set the "series" property of the chart. This will be an array of BarSeries objects.
    You may also need to set the horizontalAxis and verticalAxis properties for the chart. (I forget if there are defaults for these.)

  • Dynamically insert page breaks (runtime)

    Hi,
    I have 3 repeating frames within each other in Oracle Reports. In the 1st frame I have Product groups. I want to give the user the option (from Oracle Forms) to have all the product groups without page breaks or each product group on one seperate page.
    I only found the "Maximum records per page" property but this can't be set in runtime. I also tried to put a boilerplate on the repeating frame and gave it the property "Page break before". It worked pretty well except on page 2 it repeated the first product group and on page 3 it repeated the second productgroup and so on.
    Does anybody have a solution for my problem?
    Thanks

    I did this long time back.
    1. keep repeating frame with field(value null or line) with page break..
    2. using Format Trigger show or hide this field.

  • Setting Book Default page in runtime

    Hi All,
    How to set Book Default page in runtime.
    My requirement is based on loged in user group name we have to go to that page, in book there are four pages default is 3 page. based on user login we have to go the pirticular page.
    Thanks,
    Venkaata Sarvabatla

    Hi
    I have a similar requirement but the problem i am facing is that the control of the program does not go into the handlePostbackData() method of the desktop backing file. the URL i call from the login JSP is something like: "/../../myDesktop.portal" where myDesktop.portal is the desktop portal file having books and pages. Page1 is the default but based on an input i need to redirect to Page2 instead of landing on the default Page1. I wanted to give the redirect logic in the handlePostbackData() method but the control does not go into the method. I also tried giving sth like : "/../../myDesktop.portal?_nfpb=true&_pageLabel=Page2" but it still renders the (default) Page1.
    Do you have an idea what would I be possible missing out on or doing wrong here. Thanks.
    I am using struts portals.
    Thanks
    GT
    Edited by: 929390 on Apr 23, 2012 7:03 AM

  • How to set property classes at runtime.

    Well, as the subject line says my question is plain and simple. I don't see any property for this in SET_ITEM_PROPERTY built-in.
    Currently a form has 10 subclassed blocks and views. These blocks have almost similar/definite number of items. At a time only one block with its canvas will be shown to the user. Instead of using so many sub-classed objects, I would like to use only one block and canvas. Now I am looking get getting just property classes from the 10 child forms, which I am looking forward to apply to the common block and items. Any other ideas for the same also appreciated.
    Thanks,
    -- Raam.

    alsalamu alykom
    I think there is no way to set property classes at runtime.
    u must loop through the objects

  • A webpart or web form control on this page cannot be displayed or imported.The type could not be found or it is not registered as safe.

    Hi,
    After moving my files from SP 2010 to SP 2013 , for all my web parts i am getting A webpart or web form control on this page cannot be displayed or imported.The type could not be found or it is not registered as safe. error. I checked web.config files
    and they are there as safe control and trust level is also full. 
    These webparts work in 2010.
    Do i need to tweak something in code or distributed cache to make this thing work? The errors i see are
    Error importing WebPart. Assembly  c , Version=1.0.0.0, Culture=neutral, PublicKeyToken=216eaf49984a9b29, TypeName. C. A Web Part or Web Form Control on this Page cannot be displayed or imported. The type c Version=1.0.0.0, Culture=neutral, PublicKeyToken=216eaf49984a9b29
    could not be found or it is not registered as safe.
    Getting Error Message for Exception Microsoft.SharePoint.ApplicationRuntime.SafeControls+UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type C Version=1.0.0.0, Culture=neutral, PublicKeyToken=216eaf49984a9b29
    could not be found or it is not registered as safe.    
     at Microsoft.SharePoint.WebPartPages.WebPartImporter.CreateWebPart(Boolean clearConnections)    
     at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, Uri webPartPageUri, SPWeb spWeb)    
     at Microsoft.SharePoint.WebPartPages.WebPartGalleryItemBase.InstantiateFromXml(XmlReader reader)    
     at Microsoft.SharePoint.WebPartPages.WebPartAdder.SiteWebPartGalleryProvider.SiteWebPartGalleryItem.Instantiate()    
     at Microsoft.SharePoint.WebPartPages.WebPartGallerySourceBase.AddItemToPage(WebPartZoneBase zone, Int32 zoneIndex, WebPartGalleryItem item, String wpid)    
     at Microsoft.SharePoint.WebPartPages.WebPartAdder.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
    An error occurred while attempting to add the gallery item [Custom] c to the page. The error was: Microsoft.SharePoint.ApplicationRuntime.SafeControls+UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. The
    type c Version=1.0.0.0, Culture=neutral, PublicKeyToken=216eaf49984a9b29 could not be found or it is not registered as safe.    
     at Microsoft.SharePoint.WebPartPages.WebPartImporter.CreateWebPart(Boolean clearConnections)    
     at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, Uri webPartPageUri, SPWeb spWeb)    
     at Microsoft.SharePoint.WebPartPages.WebPartGalleryItemBase.InstantiateFromXml(XmlReader reader)    
     at Microsoft.SharePoint.WebPartPages.WebPartAdder.SiteWebPartGalleryProvider.SiteWebPartGalleryItem.Instantiate()    
     at Microsoft.SharePoint.WebPartPages.WebPartGallerySourceBase.AddItemToPage(WebPartZoneBase zone, Int32 zoneIndex, WebPartGalleryItem item, String wpid)    
    Adit

    Hi Adit,
    According to your description, my understanding is that the error occurred when you deployed the .wsp files to SharePoint 2013.
    I recommend to check if all the assemblies are put into the BIN and GAC.
    If above cannot work, you can check the troubleshooting steps in the link below:
    http://www.bluedoglimited.com/SharePointThoughts/Lists/Posts/Post.aspx?ID=189
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • One or more ActiveX controls could not be displayed because either:1 your current security settings prohibit running ActiveX controls on this page, or 2. You have blocked a publisher of one of the controls.

    hi All,
    i have one of the requirement for an application, we do upload some release not in file server and that is used in application link to see the note. in this note i have converted the Excel into .HTM format(web page). this was working fine, but from last
    two days all of a sudden we are recieving error as above.
    one or more ActiveX controls could not be displayed because either:1 your current security settings prohibit running ActiveX controls on this page, or 2. You have blocked a publisher of one of the controls.
    could anyone please help me on this.
    Thanks and Regards,
    krishnamurthy

    Hi,
    Actually Arnavsharma provided a operable method for you. But no luck, it's not invalid.
    Here I also offer you an method you can try.Please delete the extra (parasite) zone from the Zones subkey :
    Click Start , click Run , type regedit , and then click OK
    Expand the following registry subkey
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones
    Delete the extra (parasite) zone from the Zones subkey
    Note: The parasite zone is a pseudo-graphic number listed before zone number 0. The pseudo-graphic number looks like a miniature upper case "L"
    Close the registry editor
    Thanks!
    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.

  • How to get the RID of the property page of any KM document

    Hello Experts,
    I want to get the rid of the property page of any km document(details->Settings->Properties). While right clicking on the page i get the rid of that page. some part of the url is consists of render layout set, layout set mode, debug enabled, short contened id etc. I want to get this url dynamicaly so that i can pass it to some function. But this will be unique for every content. How would i get that. I dont want to hard code all the rid of the properties of doc as there is huge documents & will be changed.
    Please help me asap.
    Regards,
    Bidyut

    Hi
    You need a url which looks like the following one:
    http://<server>:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.uidetails<your path in KM: e.g. '/myFolder'>?Standalone=true&command=properties&isp=properties&StartUri=/documents&StartPage=StandaloneDetailsPage
    So it looks like
    http://myServer:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.uidetails/myFolder?Standalone=true&command=properties&isp=properties&StartUri=/documents&StartPage=StandaloneDetailsPage
    Greetz
    Christof

  • Is there any template framework to generate flex pages at runtime?

    Earlier I have worked on Apache Velocity project. With a single velocity template I was able to render 800+ different jsp pages at runtime.
    Is there any framework/functionality similar to Velocity or Freemarker framework, in flex?

    Create a zip and rename it to .cab. - that's what half of the cab files around are.
    (not a serious suggestion, but there are at least four different CAB file formats, zip included, some used in Microsoft official products, others in common products that run on Windows like Install Shield, and you need to find out what whatever is going to read it expects to be in the-file-that-happens-to-end-in-CAB before you can look for code to write it)
    (which reminds me of a web content filter at one company I used to work out which blocked all URLs which ended in CAB, so every now and again you'd get blocked from sites which used hex session keys in their URLs)

  • Document ID - Property field shows on item view property page after deactivating the Document ID Service features at Site Collection level

    Hi,
    When a site collection was created, I enabled the Document ID feature at site collection level.  Then some item was created in a document library as well as list libarary
    Now it was decided that we dont want the Document ID feature so I disable the feature from Collection feature list
    Still when a user view the property of a document it shows the Document ID property with the ID (when click on the ID it shows the message that 
    This Site Collection is not configured to use Document IDs.
    Troubleshoot
    issues with Microsoft SharePoint Foundation.
    Correlation ID: 9640ac9f-4b9c-4ae8-9f0b-402ed7e3b3c5)     Is there anything that I should do so that DOcument ID property does not show on the document property page... I tried
    to looked at the content type to see if I can remove the document ID but I could not find the Document ID as a property that can be removed from the type

     
    Hi,
    I would just remove the column from the view.  You can make views for each list, it you look under the list by Clicking List while the list is open, you should see a link in the ribbon which say "Modify view" click this link. 
    This link will open the edit view page you can then uncheck the box for the column which will remove it form that view.
    According to this
    http://msdn.microsoft.com/en-us/library/ee559302.aspx
    Deactivating the feature removes links to the Site Collection Settings page, makes the page that is used to look up document IDs no longer available, turns off the document ID service, and stops assigning document IDs. The server does not remove the columns
    that it adds at the site level when the feature is first activated so that, even after deactivation, the existing document IDs are preserved. After the feature is deactivated, users who try to use a static URL to look up an item by its document ID see an error
    message indicating that "This Site Collection is not configured to use document IDs."
    The Document id service will add new columns to the document content type and the document set content type. 
    It also adds an event receiver which should be deactivated when you deactivate the doc id service. 
    Theoretically.  You should be able to go in and remove the columns from the document type, and then force an update.
    Thanks,
    Rock Wang
    Rock Wang TechNet Community Support

  • How do I stop the pop up "An ActiveX control on this page ...?

    I recently installed an accounting program on my computer. In order to access several pages on this program, a message appears on the screen and I must address it before I can get access to my required page on the accounting program. The message is as follows: "An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?" How can this be eliminated altogether?

    Firefox doesn't natively run ActiveX controls at all. This capability might be injected into Firefox by a plugin or one of the "IE Tab" add-ons. Can you test the site in Firefox's Safe Mode? That's a standard diagnostic tool to bypass interference by extensions (and some custom settings). More info: [[Troubleshoot Firefox issues using Safe Mode]].
    You can restart Firefox in Safe Mode using
    Help > Restart with Add-ons Disabled
    In the dialog, click "Start in Safe Mode" (''not'' Reset)
    Safe mode does not automatically disable plugins. If you want to rule out plugins that might be relevant, you can disable them here:
    orange Firefox button (or Tools menu) > Add-ons > Plugins category
    Does the message go away?

  • How to control the print pages in se71 form or smartforms

    Dear All:
             I have a issue for control the print pages in se71 form or smartforms.
    For example:my report used form or smartforms to print.it have 12  total pages.but user want to print the .3rd  page.3rd  page is customized.
             How can I do it?
    Thanks
    Sun

    Hi,
    By using command node, with some command we can handle this.

Maybe you are looking for