Open existing application in application created in c#
Hello,
I want open an Windows application (game) in application created with Winform or Wpf.
Is possible ?
If is possible, you have documentation or tutorial to do that ?
Thanks,
Sly.
11 Replies
do you have more details about what you're trying to accomplish?
in more detail:
I want to create an application (Winform or Wpf) with tabs at the top of the application (like Google Chrome tabs) that I can open and close.
Each time I open a tab I would like my game to open (.exe file which depends on a folder with a lot of files) and to be integrated directly into the tab.
Each time you open a tab, the game launches once again and integrates into the tab.
I hope it was clearer.
thank you very much for the help.
and if it is possible, when the game is integrated into the tab, I would like to no longer have the Windows buttons (minimze, close ect...) just the game
@Jimmacle
Anyone have idea ?
thats a bit weird to launch a different program in yours?
i think you could use the process class to start the gsme process but then you would need to pinvoke a few functions to get the window handle of the game, also create a window inside your tabs somehow and then put the game window in your own window and modify your own window to remove the window buttons etc
i suggest to not do this and to keep the game seperate
Thanks for your reply.
The game is a turn by turn MMORPG.
Most people play with 8 client of game (fight 8 vs 8)
I already exist a software for do I want but, no sources and very bad UI.
I just search if is possible to do that in c#.
Given your answer, I think it's possible. I will try to develop this
WPF and Win32 interop
Learn how to interoperate Windows Presentation Foundation's environment for creating applications and Win32 code.
SetParent function (winuser.h) - Win32 apps
Changes the parent window of the specified child window.
FindWindowW function (winuser.h) - Win32 apps
Retrieves a handle to the top-level window whose class name and window name match the specified strings. This function does not search child windows. This function does not perform a case-sensitive search. (Unicode)
SetWindowLongW function (winuser.h) - Win32 apps
Changes an attribute of the specified window. The function also sets the 32-bit (long) value at the specified offset into the extra window memory. (Unicode)
SetWindowPos function (winuser.h) - Win32 apps
Changes the size, position, and Z order of a child, pop-up, or top-level window. These windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and is the first window in the Z order.
these might be helpful
Thank you Very much