C# runing exe inside panel -
i trying open compiled exe inside panel of code , program stays inside panel, in other words, if move window or if close window, act same program. it's working programs example, "notepad.exe", others doesn't (calc.exe example doesn't), insist open outside panel, that's when need help.
that's code far:
public partial class form1 : form { [dllimport("user32.dll")] static extern intptr setparent(intptr hwndchild, intptr hwndnewparent); [dllimport("user32.dll")] private static extern bool movewindow(intptr hwnd, int x, int y, int cx, int cy, bool repaint); public form1() { initializecomponent(); } private void form1_load(object sender, eventargs e) { process process = process.start("calc.exe"); process.waitforinputidle(); setparent(process.mainwindowhandle, this.panel1.handle); movewindow(process.mainwindowhandle, 0, 0, this.width - 90, this.height, true); } }
i true newbie on c# , progress got far videos youtube , here, doesn't work need, don't mind reformulate whole code, long works 1 program.
thank y'all in advance.
Comments
Post a Comment