Custom control references

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lionel

    #1

    Custom control references

    Hi,

    I've created a C# custom control that references some ActiveX controls.
    I need to host this control on a form that also hosts the same ActiveX
    controls.

    So I add the custom control and the individual ActiveX's to the toolbox
    & when I try to host the user control on the form using the toolbox,
    the VS.NET interop kicks in generates Ax*** wrappers for these.

    On compiling the app, I get CS1595 warnings:

    "'AxImageLib.Ax ImageCtrl' is defined in multiple places, using
    definition from C:\Work\ImageCt rl\ImgCtrl.dll"

    How serious are these warnings & is there anyway to eliminate them?

    Thanks,
    Lionel

  • Ciaran O''Donnell

    #2
    RE: Custom control references

    As long as they are all referencing the same activex dll version then it
    should all work fine. Its just a feature of how VS makes sure you have all
    the references in the build.

    Ciaran O'Donnell

    "Lionel" wrote:
    Hi,
    >
    I've created a C# custom control that references some ActiveX controls.
    I need to host this control on a form that also hosts the same ActiveX
    controls.
    >
    So I add the custom control and the individual ActiveX's to the toolbox
    & when I try to host the user control on the form using the toolbox,
    the VS.NET interop kicks in generates Ax*** wrappers for these.
    >
    On compiling the app, I get CS1595 warnings:
    >
    "'AxImageLib.Ax ImageCtrl' is defined in multiple places, using
    definition from C:\Work\ImageCt rl\ImgCtrl.dll"
    >
    How serious are these warnings & is there anyway to eliminate them?
    >
    Thanks,
    Lionel
    >
    >

    Comment

    • Lionel

      #3
      Re: Custom control references

      Thanks for your reply.

      If I manually add a reference to the user control from the solution
      tab, VS.NET doesn't generate the interop files & only adds the user
      control. Which is what I'd like to have when adding the user control
      via the toolbox. So its something that the toolbox does.

      Would be nice to have a way to disable this feature while adding
      controls.

      Cheers,
      Lionel

      Ciaran O''Donnell wrote:
      As long as they are all referencing the same activex dll version then it
      should all work fine. Its just a feature of how VS makes sure you have all
      the references in the build.
      >
      Ciaran O'Donnell
      >
      "Lionel" wrote:
      >
      Hi,

      I've created a C# custom control that references some ActiveX controls.
      I need to host this control on a form that also hosts the same ActiveX
      controls.

      So I add the custom control and the individual ActiveX's to the toolbox
      & when I try to host the user control on the form using the toolbox,
      the VS.NET interop kicks in generates Ax*** wrappers for these.

      On compiling the app, I get CS1595 warnings:

      "'AxImageLib.Ax ImageCtrl' is defined in multiple places, using
      definition from C:\Work\ImageCt rl\ImgCtrl.dll"

      How serious are these warnings & is there anyway to eliminate them?

      Thanks,
      Lionel

      Comment

      Working...