using System;
using System.Windows;
using System.Windows.Interop; // WindowInteropHelper
namespace WindowsApplication1
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Window1 : System.Windows.Window
{
public Window1()
{
try
{
InitializeComponent();
this.SourceInitialized += new EventHandler(Window1_SourceInitialized);
}
catch(Exception exp)
{
string str = exp.Message;
}
}
void Window1_SourceInitialized(object sender, EventArgs e)
{
WindowInteropHelper helper = new WindowInteropHelper(this);
IntPtr ptr = helper.Handle;
}
//private void ClickBtn(object sender, EventArgs e)
//{
//}
}
}
using System.Windows;
using System.Windows.Interop; // WindowInteropHelper
namespace WindowsApplication1
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Window1 : System.Windows.Window
{
public Window1()
{
try
{
InitializeComponent();
this.SourceInitialized += new EventHandler(Window1_SourceInitialized);
}
catch(Exception exp)
{
string str = exp.Message;
}
}
void Window1_SourceInitialized(object sender, EventArgs e)
{
WindowInteropHelper helper = new WindowInteropHelper(this);
IntPtr ptr = helper.Handle;
}
//private void ClickBtn(object sender, EventArgs e)
//{
//}
}
}