private void lblEmbedHandle_Click(object sender, EventArgs e) { var frmHandle = new FormHandle(); if (frmHandle.ShowDialog()== System.Windows.Forms.DialogResult.OK) { var handle = frmHandle.GetHandle(); SetParent(handle, this.Handle); Win32API.SetWindowLong(new HandleRef(this.appBox, handle), GWL_STYLE, WS_VISIBLE); } }
private void lblEmbedHandle_Click(object sender, EventArgs e) { var frmHandle = new FormHandle(); if (frmHandle.ShowDialog() == System.Windows.Forms.DialogResult.OK) { var handle = frmHandle.GetHandle(); AppContainer.SetParent(handle, this.Handle); AppContainer.SetWindowLong(new HandleRef(this.appBox, handle), GWL_STYLE, WS_VISIBLE); } }