Jump to content

  • Log In with Google      Sign In   
  • Create Account

[SharpDXToolkit][Winform] Winform creating gaps in SharpDX

  • You cannot reply to this topic
No replies to this topic

#1 Zurkloyd   Members   -  Reputation: 127


Posted 07 August 2014 - 07:58 AM

Hello everybody, this is my first post on the forums and with that i would like to ask a question for a problem that has been troubling me over the past days. I recently started messing around with trying to make a HTML-Gui with the SharpDX Toolkit. I am currently using Awesomium for the webbrowser as the WPF style allows transparency for that. I messed around a bit and got it working. Sadly, the outcome was this:




Before i went with this way, i used to draw a second Winform on-top over the original game form and rendered element away with a TransparencyKey. unfortunately, this method took away the possibilities of making things transparent.


What happends here is that my WinForm element create a gap in my SharpDX window. The purple you see is the background color of my Form. I have been searching around for the last 2 days and was unable to find a solution to this. What i eventually want to have is this:




This is the outcome i want to have. I have been looking around and found out that in XNA, this problem does not occour.





What i did is, i launched SharpDX in a new winform so i could attach elements to it

using (var program = new Chartreuse_Engine())

Using that way, i attached a ElementHost to the winform and run a WPF control inside it that uses the awesomium element. Using the WPF i could allow transparency. But now i dont know how to solve this problem. I dont even know where to start looking for this problem as i am not quite sure how this happends. What i want eventually is that the purple parts on the game ( which is my Form's background color ) to dissapear. If any of you could help me, that would be amazing!


( p.s. please be kind as this is my first post )

Edited by Zurkloyd, 07 August 2014 - 07:59 AM.