473,698 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DirectX .Net?

Does anyone know if anything is in the works to make DirectX work better
with .Net?

Thanks!
Nov 21 '05 #1
4 1784
Hi,

http://www.microsoft.com/downloads/d...displaylang=en

Ken
--------------------
"gregory_ma y" <None> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Does anyone know if anything is in the works to make DirectX work better
with .Net?

Thanks!

Nov 21 '05 #2
"gregory_ma y" <None> schrieb:
Does anyone know if anything is in the works to make DirectX work better
with .Net?


What doesn't work properly?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3
Thanks. I will look over this 9.0b SDK.
"gregory_ma y" <None> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Does anyone know if anything is in the works to make DirectX work better
with .Net?

Thanks!

Nov 21 '05 #4
I have been working on a screen capture routine. This is close (Its what I
am using for now), one big problem with this .... Direct X overlays &
Applications don't get captured. I wish there is a nice way to grab the
Screen, Menu Pop-up's, Cursors, & DirectX Overlays all in one shot (Oh, and
it needs to be fast).

If you have any suggestions they are much appreciated!

Thanks!

Public oBackground As System.Drawing. Bitmap

Public Sub CaptureScreen()

Dim hSDC, hMDC, hMDC2 As Integer

Dim hBMP, hBMPOld As Integer

Dim CurInf As CursorInfo

Dim CurPos As PointAPI

Dim FW As Integer 'Width

Dim FH As Integer 'Height

Try

'Source DC

hSDC = CreateDC("DISPL AY", "", "", "")

'Destination DC with transpairent windows

hMDC = CreateCompatibl eDC(hSDC)

'Screen Width

FW = GetDeviceCaps(h SDC, HORIZRES)

'Screen height

FH = GetDeviceCaps(h SDC, VERTRES)

hBMP = CreateCompatibl eBitmap(hSDC, FW, FH)

hBMPOld = SelectObject(hM DC, hBMP)

Call BitBlt(hMDC, 0, 0, FW, FH, hSDC, 0, 0, RasterOperation s.SRCCOPY +
RasterOperation s.CAPTUREBLT)

Call DeleteDC(hSDC)

'get cursor information

CurInf.cbSize = Len(CurInf)

Call GetCursorInfo(C urInf)

If (CurInf.flags And CURSOR_SHOWING) Then

'Call GetCursorPos(Cu rPos)

Call DrawIconEx(hMDC , CurInf.ptScreen Pos.X, CurInf.ptScreen Pos.Y, _

CurInf.hCursor, 0, 0, 0, False, DI_NORMAL)

End If

Call SelectObject(hM DC, hBMPOld)

Call DeleteDC(hMDC)

oBackground = System.Drawing. Image.FromHbitm ap(New IntPtr(hBMP))

DeleteObject(hB MP)

DeleteObject(hB MPOld)

'Seems to be a memory hole in fromHbitmap ....

'Code gets SLOW when not GC.Collect ing ... wierd.

'GC.Collect() &&&

Catch ex As Exception

Debug.WriteLine ("General GDI ERROR: " & ex.Message.ToSt ring)

End Try

End Sub

' Constants - BitBlt.dwRop

Public Enum RasterOperation s

SRCCOPY = &HCC0020 ' Copies the source rectangle directly to the destination
rectangle.

SRCPAINT = &HEE0086 ' Combines the colors of the source and destination
rectangles by using the Boolean OR operator.

SRCAND = &H8800C6 ' Combines the colors of the source and destination
rectangles by using the Boolean AND operator.

SRCINVERT = &H660046 ' Combines the colors of the source and destination
rectangles by using the Boolean XOR operator.

SRCERASE = &H440328 ' Combines the inverted colors of the destination
rectangle with the colors of the source rectangle by using the Boolean AND
operator.

NOTSRCCOPY = &H330008 ' Copies the inverted source rectangle to the
destination.

NOTSRCERASE = &H1100A6 ' Combines the colors of the source and destination
rectangles by using the Boolean OR operator and then inverts the resultant
color.

MERGECOPY = &HC000CA ' Merges the colors of the source rectangle with the
brush currently selected in hdcDest, by using the Boolean AND operator.

MERGEPAINT = &HBB0226 ' Merges the colors of the inverted source rectangle
with the colors of the destination rectangle by using the Boolean OR
operator.

PATCOPY = &HF00021 ' Copies the brush currently selected in hdcDest, into
the destination bitmap.

PATPAINT = &HFB0A09 ' Combines the colors of the brush currently selected in
hdcDest, with the colors of the inverted source rectangle by using the
Boolean OR operator. The result of this operation is combined with the
colors of the destination rectangle by using the Boolean OR operator.

PATINVERT = &H5A0049 ' Combines the colors of the brush currently selected
in hdcDest, with the colors of the destination rectangle by using the
Boolean XOR operator.

DSTINVERT = &H550009 ' Inverts the destination rectangle.

BLACKNESS = &H42 ' Fills the destination rectangle using the color
associated with index 0 in the physical palette. (This color is black for
the default physical palette.)

WHITENESS = &HFF0062 ' Fills the destination rectangle using the color
associated with index 1 in the physical palette. (This color is white for
the default physical palette.)

NOMIRRORBITMAP = &H80000000 ' Windows 98, Windows 2000: Prevents the bitmap
from being mirrored.

CAPTUREBLT = &H40000000 ' Windows 98, Windows 2000: Includes any windows
that are layered on top of your window in the resulting image. By default,
the image only contains your window.

End Enum
"gregory_ma y" <None> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Does anyone know if anything is in the works to make DirectX work better
with .Net?

Thanks!

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
36817
by: kastillo | last post by:
Im trying to install directx 9.0 c , but i simply cant . When i run the installer it just says " The installed components are ready to use". This is the report on directx.log : 09/10/05 23:24:44: dsetup32: === SetupForDirectX() start === 09/10/05 23:24:44: dsetup32: DXSetupCommand = 0. 09/10/05 23:24:44: DXSetup: DSetupCallback(): Phase = 0, Steps = 0 09/10/05 23:24:44: dsetup32: DirectXSetupIsJapanese == 0 09/10/05 23:24:44: dsetup32:...
2
8013
by: Akkadian123 | last post by:
Hi guys, I'm a student of c#, and I was wondering how one would take advantage of multimedia in most c# apps/games. I assume one would use directx9, since there doesn't seem to be any support for audio, video, etc in c# itself (correct me if im wrong there). What is the best way to learn directX, especially for c#? Can anyone recommend any good books?
2
2927
by: Michael Mayer | last post by:
First of all, sorry for the cross-post. Seems like there should be a managed directx newsgroup. I'm trying to open the following sample application that comes with the DirectX SDK. C:\DXSDK\Samples\C#\AudioVideo\Bin\csAVPlayer.exe It will not play some of the samples shipped with the SDK. It either completey hangs the application (and I have to use Windows Task Manager to kill it) or sometimes it displays an error message. Below...
6
7134
by: ammd | last post by:
Hi, I installed Microsoft DirectX 9.0 SDK (Summer 2004) but when I create a project and try to add the necessary references I can't find them. Does anybody know where to look for them? BTW, I have VS 2002. Don't know if there's an incompatibility issue. Thanks.
2
5250
by: Diego_Atos | last post by:
I want to create objects using directX. I downloaded SDK version of DirectX. I've installed it. Which is the right dll to add to references? I can't find it. thanks -- -Diego (Atos)-
4
9098
by: Junaid Hussain | last post by:
Hi, I am thinking about developing a 3D pool game in C# using DirectX, however when I compile a C# at the command prompt using; csc PoolGame.cs , I get the following error message; The type or namespace name 'DirectX' does not exist in the class or namespace 'Microsoft' (are you missing an assembly reference?) Im not sure why it says this because I have DirectX 9.0 installed ??
9
7480
by: Mike P | last post by:
Problems, problems... Im trying to create DirectX Projects within C# and to also look at the latest DirectX C# Samples. I have just installed MS Visual C# .net Standard Edition on my Windows XP Pro PC and I then installed the full DirectX 9.0 SDK (Summer 2004) & then the latest DirectX 9.0 SDK (Feb 2005) Spent several hours doing all this but there are NO DirectX C# sample
0
2941
by: Harvey Cohen | last post by:
Hello all, I have some C# code that implements calls to DirectX.DirectSound. It compiles under both VS .NET 2003 and VS 2005 and runs under VS .NET 2003 and VS 2005 on a Compaq laptop (Windows XP Home), a Dell Xeon workstation (Windows XP Pro) and a Gateway GM 825 (Windows XP Media Center). It also runs on the Dell and the Compaq under VS 2005, but when I attempt to run the code under VS 2005 on the Gateway (Windows XP MCE), I get...
14
2651
by: Jessica Weiner | last post by:
I am writing an application in C# which need to plot graphs and simple shapes (polygons, circles, squares etc). Which library is better for this purpose and why? Thanks.
11
3460
by: raylopez99 | last post by:
I just downloaded the apparently free SDK for DirectX 9, all 200+ MB of it, but as I read about WPF I wonder: is DirectX obsolete? Should I even bother learning how to use it? After all, the end user must have the DirectX library installed on their PC before they can use any video playing program you write. Does WPF even use DirectX? Or are the functions of DirectX (mostly video and graphics stuff, possibly accelerated via software...
0
8671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9152
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9016
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8856
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.