As jmcilhinney already suggested. Start by replacing the ActiveX component with the .Net classes.