#author("2019-10-14T15:16:56+08:00","default:Admin","Admin") Windows Form ※前提条件:本情報はAndroid Studio 1.5.1を基づいて説明してる [DllImport("user32.dll")] static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); private void button1_Click(object sender, EventArgs e) { try { Process p = Process.Start(textBox1.Text); p.WaitForInputIdle(); Thread.Sleep(3000);//これが重要 SetParent(p.MainWindowHandle, panel1.Handle); } catch (Exception ex) { MessageBox.Show(ex.Message); } } 超多機能のアクセス解析が永久無料! コメント: |