public class MyClass { private readonly IWin32Window _owner; public MyClass(IWin32Window owner) { _owner = owner; } public void ShowMessage(string message) { MessageBox.Show(_owner, message, "MyApp", MessageBoxButtons.OK, MessageBoxIcon.Information); } }This code creates a class that takes an instance of IWin32Window as a constructor parameter. It contains a method that displays a message box using the IWin32Window instance as the owner. The package library for IWin32Window is System.Windows.Forms.