Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: DirectX VB.NET
Hi everyone!
I am new to this forum and this is my first question, so please don't judge me too strict.
 
I am using DirectX for some very simple graphics in my VB.net office Add-in. However, I can not make the background of the directX device to become transparent. There is not much info on the web, so I am counting on you! Please help!
 
I could not use WPF because there is no paint event, yet I need my graphics to be dynamic and move together with the cursor.
 
Please help!!!
 

Thanks
Posted 24-Sep-12 0:54am
Edited 25-Sep-12 21:43pm
v2
Comments
Sergey Alexandrovich Kryukov at 24-Sep-12 13:12pm
   
Why DirectX? Not WPF?
--SA
Sandeep Mewara at 26-Sep-12 2:53am
   
OP replied:
Sergey, Thanks for your reply. I would not mind using something instead of directX, if it would provide good performance result for Office graphics. However, I am absolutely new to WPF and never had a chance to use it. Can you please guide me, where I should start in order to achieve my goal faster. Basically I need a transparent rectangle over transparent form. Currently I am using built in Graphics methods. Thanks!!!
Bronfman.I.P at 25-Sep-12 4:11am
   
Sergey,
 
Thanks for your reply.
I would not mind using something instead of directX, if it would provide good performance result for Office graphics. However, I am absolutely new to WPF and never had a chance to use it.
 
Can you please guide me, where I should start in order to achieve my goal faster.
Basically I need a transparent rectangle over transparent form. Currently I am using built in Graphics methods.
 
Thanks!!!
Sergey Alexandrovich Kryukov at 26-Sep-12 17:20pm
   
Then you really need to know some WPF. Using other libraries with DirectX is real pain, I know from experience, but basically, WPF is a cultured and very advanced way of using DirectX indirectly (!) while providing its performance, and a lot more, in an absolutely smooth way.
 
As to the guide. Perhaps, you need to review the WPF introduction first and perhaps start development of simple skeleton applications, to get the feel of it. Then, if you can explain your primary goals and your ultimate goals, ask particular question(s).
 
Well, the transparent rectangle is not quite one of them. In WPF, unlike Forms, everything is transparent by definition, it's just the property like color. It's relatively usual thing, for example, to have overlapping semi-transparent UI controls (UI elements, more exactly).
 
--SA
Sergey Alexandrovich Kryukov at 26-Sep-12 17:20pm
   
And please see my updated answer, after [EDIT].
 
Also, I think you can accept my answer formally (green button) -- thanks.
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Have a look at SlimDX[^], it's pretty feature complete.
 
Best regards
Espen Harlinn
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I suggest you use WPF instead. With VB.NET and .NET Framework 3 and later, you can use WPF which is based on DirectX, provides its performance, but is millions time easier and safer to use.
 
[EDIT]
 
Thank you for clarifications. Please see my comment to the question, in reply to the comment on transparent window and rectangle. As I say, you need to start with overview and simple things, but transparency is not actually one of the problems, unlike Forms. Please start here:
http://msdn.microsoft.com/en-us/library/ms754130.aspx[^].
 
Most likely, you will be able to proceed by yourself. If you face some problems, ask some more specific questions.
 
—SA
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 DamithSL 295
1 OriginalGriff 214
2 BillWoodruff 170
3 Zoltán Zörgő 165
4 Maciej Los 113
0 OriginalGriff 7,760
1 DamithSL 5,874
2 Sergey Alexandrovich Kryukov 5,444
3 Maciej Los 5,076
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web04 | 2.8.141223.1 | Last Updated 26 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100