Making 3D Digitizer plugin for Rhino 5 compatible to Rhino 6

Our company uses a 3D Digitizer plugin which is built with the help of [WintabDN library] (GitHub - aledelgo/WintabDN: This is a fork of Wacom WintabDN project). It was originally written for the Rhino 5 version but now we are using Rhino 6. The originally compiled plugin wouldn’t work with Rhino 6. So I compiled the code with updated reference with the most recent version of rhinocommon. When I run the code in the Visual studio it builds the .rph file successfully but when I try to connect the plugin at Tools—> 3-D Digitizer —> Connect . I see the error “Unable to connect to the digitizer.” I also looked at this post but I didn’t find it much helpful.

I suspect the problem might be coming from DigiPage.cs file which is like this:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Veada.JSON;

namespace WintabDigitizer
{
public class DigiPage : Rhino.UI.OptionsDialogPage
{
WintabOptionControl winopt;

  public DigiPage() : base("Wintab Digitizer")
  {
  	winopt = new WintabOptionControl();
  	if (WintabDigitizerPlugIn.Instance != null)
  		winopt.SetShortcuts(WintabDigitizerPlugIn.Instance.Shortcuts);
  }

  public override bool OnApply()
  {
  	if (WintabDigitizerPlugIn.Instance != null)
  	{
  		WintabDigitizerPlugIn.Instance.SetShortcutSettings(winopt.GetShortcuts());
  	}
  	return base.OnApply();
  }


  public override void OnDefaults()
  {
  	if (WintabDigitizerPlugIn.Instance != null)
  	{
  		JsonObject defaults = new JsonObject(WintabDigitizerPlugIn.Instance.GetDefaultShortcuts());
  		WintabDigitizerPlugIn.Instance.SetShortcutSettings(defaults);
  		winopt.SetShortcuts(defaults);
  	}
  	base.OnDefaults();
  }

  public override bool ShowDefaultsButton
  {
  	get
  	{
  		return true;
  	}
  }

  public override System.Windows.Forms.Control PageControl => winopt;

}
}

I think the problem comes from the last line which is

public override System.Windows.Forms.Control PageControl => winopt;

I have to comment it out in my code because it was throwing this error:

‘DigiPage.PageControl’: type must be ‘object’ to match overridden member ‘StackedDialogPage.PageControl’

After commenting on the above-mentioned line out, my code still was able to build successfully but I suspect this might be the error! Thanks!