Custom Controls - InfoPath Dev
in

InfoPath Dev

Custom Controls

Last post 10-26-2005 01:41 PM by netoec84. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 10-22-2005 11:09 AM

    Custom Controls

    Hi I read a article about Custom Controls using c# http://blogs.msdn.com/infopath/archive/2005/04/15/408728.aspx) I create a control and I add it to InfoPath custom controls, but when I click Preview Form I get a error menssage, (InfoPath can't create a new blank form. Can't create one or more necesary controls for this form) I don't understand the last part in the article and maybe it's the reason for the error... what's the problem? any idea?

    Thank you
  • 10-22-2005 01:50 PM In reply to

    Could you specify what part of the article you are referring to?

    //AndersR


  • 10-22-2005 07:07 PM In reply to

    "Getting a .NET User Control into a Self-Registering CAB file" Is it necesary? or without it can create a control?
  • 10-23-2005 04:30 AM In reply to

    I guess it would depend on the .NET user control you are creating.

    http://go.microsoft.com/?linkid=2316315
    This webcast shows examples where no cab file were used, but since you are using COM interop (you are using .NET) the MSI is necessary.

    As i read it, you create a Setup Project (add project > setup and deployment projects) then add a CAB Project (under Setup and Deployment projects).

    Add the INF file mentioned to your Setup Project. Chance MSI file name to match your project.
    Be sure to set the Content property for this file, or it wont be included in the CAB project.

    You now need to add output from your project to the setup projects:

    Right click setup project and select Add > Project Output
    Select your UC project and select Primary output and Content Files (hold down ctrl), press OK.

    Do the same for the CAB project, but remember to select the setup project instead of the UC project.

    Primary output is your dll's, content files is your User Control, INF files etc

    When you build your solution, the cab file will be in the bin directory of the setup project.

    I havent tried the above, but it should work

    HTH
    //AndersR


  • 10-24-2005 04:53 AM In reply to

    Hi, I read and try the blog post "Lab 6: Active X controls (with Visual Basic 6.0)" http://blogs.msdn.com/ajma/articles/213868.aspx). I managed to create a control and inserted it in InfoPath Custom controls, but when I click en a Preview Form (in design mode) I get an error that says "The form cannot be opened because it requires a control that lacks or it is not installed correctly" but if I Fill a form, save and click in Print preview I can view the control but with a button command fill from black (my custom control has a command button and a label)... Can you help me? Whats the problem?

    Thank you


    www.EcuadorDeCerca.com
  • 10-24-2005 06:15 AM In reply to

    Hi,

    If you follow exactly the steps described in the Lab, you shouldn't have any error message. You may want to start from scratch (both the control and the form).
    On the other hand, the "black area" issue is a different story. When you try to print a form with a VB6-based ACtiveX control on it, parts of the controls (such as buttons) will print as black rectangles. I experienced the same issue more than 1 year ago and forwarded sample to MS. At the time, the problem was acknoledge, but no immediate solution was available. Did you try it with SP2, maybe a patch was part of that release.
    The workaround that I used at the time was to use a control on the data entry side (to provide the rich interface that I needed), and to build a print View where the ActiveX controls were replaced by textboxes or other built-in controls to display the final selection.

    Hope that it helps.

    Regards,

    Franck Dauché
  • 10-25-2005 03:46 PM In reply to

    Ok, Thank you. Please help me with the seccion "Adding a .NET User Control to the InfoPath Controls Task Pane" http://blogs.msdn.com/infopath/archive/2005/04/15/408728.aspx) I don't understand how create a ict file, how binding data, etc...

    www.EcuadorDeCerca.com
  • 10-25-2005 04:14 PM In reply to

    Hi,

    Go to:
    http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.infopath&lang=en&cr=US

    and search for a post dated 10/10/2005 untitled: Link Custom Controls to infopath.

    Read what Thierry had to say about this...

    Regards,

    Franck Dauché
  • 10-26-2005 01:41 PM In reply to

    Thanks!!! I can create my own control with c# =), one question more.... how can I customize the icon?

    www.EcuadorDeCerca.com
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.