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

Like
0Likes
Like

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:

 

HtmlGUI_6.PNG

 

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:

 

HtmlGUI_6_what_i_want.png

 

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

 

XNA_WinForms1_GraphicsDevice_01_large.jp

 

 

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

using (var program = new Chartreuse_Engine())
{
    program.Run(_GameWindow);
}

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.


Sponsor:




PARTNERS