Using VSPrint8.ocx in VB.Net 2019

Posted by: stein.groth on 26 August 2019, 12:44 am EST

  • Posted 26 August 2019, 12:44 am EST

    I'm a longtime user of VSPrinter using VB6.

    Currently I'm working on migrating VB6 apps to VB.Net 2019. "ComponentOne VSPrinter 8.0" is added using Tools > Choose Toolbox Items > COM Components.

    I get errormessage
    "BC30456 'TableCell' is not a member of 'AxVSPrinter'
    (TableCell is not visible using Object browser in Visual Studio).

    Is it possible to use VSPrinter8.OCX in VB.Net ?

    (Newbie in .Net)
  • Marked as Answer

    Replied 26 August 2019, 6:00 pm EST

    Hi Stein,

    The ActiveX controls are not meant to be used in .Net applications and hence, we do not support them in .Net environment. They will work in .Net Framework like any other ActiveX control, but of course with limitations.

    Since you are migrating to VB.Net, I would suggest you to upgrade to WinForms Edition of controls which are designed to be used in .Net framework:

    Note that the .Net equivalent of VSPrinter is C1PrintDocument:

    Regarding the error message that is thrown, you cannot use TableCell directly in .Net as you would do in VB6. For example, the following statement in VB6:
    vp.TableCell(tcBackColor, 1, 1) = vbRed

    would be changed to,
    vp.set_TableCell(VSPrinter8Lib.TableCellSettings.tcBackColor, 1, 1, 1, 1, Color.Red)

    in .Net.



Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels