Raja Priya Meganathan

Raja Priya Meganathan

  • 1.9k
  • 106
  • 1.5k

How to access the WindowInteropHelper in the System.Windows.Forms.Form

Jul 19 2021 4:11 PM

Hi all,

I have created the access token in the windows c# application. Like the below code,

result = await app.AcquireTokenInteractive(scopes)
                   .WithParentActivityOrWindow(new WindowInteropHelper(this).Handle) 

In this, the WindowInteropHelper got error because it contains the "System.Windows.window" as parameter. Is there any option to set this WindowInteropHelper in the "System.Windows.Forms.Form" page?


Answers (2)