title: Embed Teamviewer in Win Forms Applications
body: <p>(C#) hi want to incorporate in my win forms Teamviewer.</p>
  
  <p>how could this be done?</p>
  
  <p>The following code works with other app like notepad or paint ... but with TeamViewer not working.</p>
  
  <pre><code>namespace WindowsFormsApplication1
      { 
          public partial class Form1 : Form
          {
  
              [DllImport("user32.dll")]
              static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
  
              public Form1()
              {
                  InitializeComponent();
              }
  
              private void button1_Click(object sender, EventArgs e)
              {
                  Process p = Process.Start("notepad.exe");
                  Thread.Sleep(500); // Allow the process to open it's window
                  SetParent(p.MainWindowHandle, this.Handle);
              }
          }
      }
  </code></pre>
  
  <p>stay blessed!</p>