Click here to Skip to main content
15,888,069 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello guys,

There is this thing that has really been bugging me and I've recently become interesting in finding out how to do this. After several pointless hours spent on google I couldn't find my answer. I've recently done a bit of work with DirectX but only have become a little wiser.

My Aim:

I've been trying to make a program that can be opened while gaming (just like mumble is able to open it's chat functions in game, and FRAPS is able to show an FPS counter).

My Question:

How do those programs do this? How do they detect that this certain game has initiated and get their own windows/objects drawn within their screens? (I know they aren't seperate windows, I've tried to do it using a window method but it's impossible to get mine on top of the game - dismiss that idea).

I would extremely appreciate if anyone could push me in the right direction with the following:
- How does the program detect the game, and get it's own objects/window drawn into it?
- If this is using DirectX/OpenGL functions, how can I do this too?

I followed a tutorial to create a simple line and draw that on my own form, but how can I draw it let's say on the game (i.e. if I can draw a line, I can do anything else I want because I know how its' done.

At this point:
device = New Device(0, DeviceType.Hardware, Me.Handle, CreateFlags.SoftwareVertexProcessing, present)

I have also used another window's handle instead of Me.Handle but that didn't seem to work.

Anyone got any ideas? I would highly appreciate your help.
Posted
Comments
Sergey Alexandrovich Kryukov 1-Jan-13 14:50pm    
If you are using VB.NET, why considering using DirectX directly? It's much better to use WPF which is based on DirectX.
—SA

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900