# Difficulty Running Unreal 4 inside a wpf application ?

**URL:** <https://forums.unrealengine.com/t/difficulty-running-unreal-4-inside-a-wpf-application/307151>\
**Category:** Platform & Builds\
**Tags:** window, unreal-engine, UE4, question\
**Created:** [February 16, 2015, 10:03pm UTC](https://forums.unrealengine.com/t/difficulty-running-unreal-4-inside-a-wpf-application/307151 "2015-02-16T22:03:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh314](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Josh314](https://forums.unrealengine.com/u/Josh314)\
**Post date:** [February 16, 2015, 10:03pm UTC](https://forums.unrealengine.com/t/difficulty-running-unreal-4-inside-a-wpf-application/307151/1 "2015-02-16T22:03:26Z")

</div>

Currently I am trying to run unreal inside of another application with a set resolution. However when someone clicks the window the window expands to a different sizes. What I’m tiring to figure out is there a way to stop unreal from auto sizing from a click or potential disable this this feature from unreal or have it be a view only style window with fixed window size. Any help would be greatly appreciated. Thank you.

---

<div class="post-metadata">

**Author:** ![Josh314](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Josh314](https://forums.unrealengine.com/u/Josh314)\
**Post date:** [March 27, 2015, 4:03am UTC](https://forums.unrealengine.com/t/difficulty-running-unreal-4-inside-a-wpf-application/307151/2 "2015-03-27T04:03:09Z")

</div>

Best solution so far is to run another transparent window application after unreal loads.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_53d48b3a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_53d48b3a](https://forums.unrealengine.com/u/anonymous_user_53d48b3a)\
**Post date:** [April 9, 2015, 8:13am UTC](https://forums.unrealengine.com/t/difficulty-running-unreal-4-inside-a-wpf-application/307151/3 "2015-04-09T08:13:05Z")

</div>

I have no idea how to embed the Unreal engine in another application. I have been working on this for days. It seems you succeeded in this. Could you give me some idea?

---

<div class="post-metadata">

**Author:** ![Josh314](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Josh314](https://forums.unrealengine.com/u/Josh314)\
**Post date:** [April 9, 2015, 2:31pm UTC](https://forums.unrealengine.com/t/difficulty-running-unreal-4-inside-a-wpf-application/307151/4 "2015-04-09T14:31:15Z")

</div>

For starters this is a great source  
[http://www.codeproject.com/Tips/673701/Hosting-EXE-Applications-in-a-WPF-Window-Applicati](http://www.codeproject.com/Tips/673701/Hosting-EXE-Applications-in-a-WPF-Window-Applicati)  
If you follow the instructions and download the code this author provides it there you will have an application that will run any exe application in its window. From here you will want to make a few additional changes. In the app control class were unreal will be ran as a child class to your window the line after \_childp.WaitForInputIdle(); you will want to add something like

System.Threading.Thread.Sleep(10); or

while (\_childp.MainWindowHandle == IntPtr.Zero)  
{  
System.Threading.Thread.Sleep(10);

```
               }

```

Because Unreal takes time to load up and the waitForInputIdle will likely skip past waiting for unreal. From there you will probably want to look into the windows Styles for any changes you want to mke to unreals window when applied to your application here [Window Styles (Winuser.h) - Win32 apps | Microsoft Docs](https://msdn.microsoft.com/en-us/library/windows/desktop/ms632600%28v=vs.85%29.aspx)  
For addinal reasources [pinvoke.net](http://pinvoke.net) is great as well.  
If you have any other question feel free to to contact me here hope this helps.

---

<div class="post-metadata">

**Author:** ![JHenrySlentz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JHenrySlentz](https://forums.unrealengine.com/u/JHenrySlentz)\
**Post date:** [May 28, 2015, 5:23pm UTC](https://forums.unrealengine.com/t/difficulty-running-unreal-4-inside-a-wpf-application/307151/5 "2015-05-28T17:23:19Z")

</div>

We’re using Awesomium on our project which creates an HTML5 browser in a C# (WPF) app…from there you have access to the Unreal Engine, it’s performance isn’t the greatest but we just use it for 3D UI elements and for that it works great!

Now Awesomium is a project in a great deal of hurt as it seems the developers have bailed it on it but the browser core it’s built on is current enough (maybe not for long) to support Unreal.

Good Luck!

Update: Sorry! Our developer just chimed in to say we’re abandoning Awesomium entirely for Coherent Labs .Net Browser Controls.

---

<div class="post-metadata">

**Author:** ![tatva12345](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tatva12345](https://forums.unrealengine.com/u/tatva12345)\
**Post date:** [July 5, 2023, 9:45am UTC](https://forums.unrealengine.com/t/difficulty-running-unreal-4-inside-a-wpf-application/307151/7 "2023-07-05T09:45:01Z")

</div>

@Josh314  
I am trying to integrate unreal engine 5 into wpf c# application, can you please guide me steps for the same as you have already implemented?
