473,396 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DirectX .Net?

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

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

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

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

Thanks!

Nov 21 '05 #2
"gregory_may" <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_may" <None> wrote in message
news:%2****************@tk2msftngp13.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("DISPLAY", "", "", "")

'Destination DC with transpairent windows

hMDC = CreateCompatibleDC(hSDC)

'Screen Width

FW = GetDeviceCaps(hSDC, HORIZRES)

'Screen height

FH = GetDeviceCaps(hSDC, VERTRES)

hBMP = CreateCompatibleBitmap(hSDC, FW, FH)

hBMPOld = SelectObject(hMDC, hBMP)

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

Call DeleteDC(hSDC)

'get cursor information

CurInf.cbSize = Len(CurInf)

Call GetCursorInfo(CurInf)

If (CurInf.flags And CURSOR_SHOWING) Then

'Call GetCursorPos(CurPos)

Call DrawIconEx(hMDC, CurInf.ptScreenPos.X, CurInf.ptScreenPos.Y, _

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

End If

Call SelectObject(hMDC, hBMPOld)

Call DeleteDC(hMDC)

oBackground = System.Drawing.Image.FromHbitmap(New IntPtr(hBMP))

DeleteObject(hBMP)

DeleteObject(hBMPOld)

'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.ToString)

End Try

End Sub

' Constants - BitBlt.dwRop

Public Enum RasterOperations

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_may" <None> wrote in message
news:%2****************@tk2msftngp13.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
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...
2
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...
2
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....
6
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...
2
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
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...
9
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...
0
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...
14
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
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
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,...

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.