Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Hiding the default DBP window with DGDK.NET

Author
Message
thierry st malo
19
Years of Service
User Offline
Joined: 7th Nov 2005
Location: Saint-Malo, France
Posted: 22nd Feb 2007 08:44
Hi, all!
In order to get a better understanding of some DGDK.NET features, I'm coding a sample VB Express app where I want DBP running normally with its usual loop within a PictureBox, itself embedded in a normal window, the GUI being managed in the usual way by Windows XP. Problem: I can't get rid of DBP's default window, which can be very large and even hide mine at times. I've tried this:

MyWin = New WinMain
MyWin.Show()
If Not InitializeDGDK("...") Then
MsgBox("Unable to initialize DGDK.NET", IDC_CRITICAL)
End
End If
oDBDisplay.HideWindow()
H = MyWin.PictureBox1.Handle
oDBDisplay.OverrideHWND(H)
oDBDisplay.SetDisplayMode(1024, 768, 32)
Application.DoEvents()

but it doesn't seem to work. Of course I can maximize my window, but it's clumsy and I don't want it to be mandatory. As I have a working knowledge of the DirectX9 SDK, is there something I can do (oDBDisplay seems to give me access to Direct3D and its device)?
Thanks,
Thierry
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 22nd Feb 2007 09:48 Edited at: 22nd Feb 2007 09:53
thierry,

At the top of your module, declare this:



Then do this:



As for oDBDisplay giving you access to the Direct3D device, it does return an actual address to an IDirect3D9 or IDirect3DDevice9, but using these interfaces directly within VB.NET is extremely difficult. They really should be used from a managed C++ project for plugin development etc. You'll need to learn about Interop access in order to use the address returned by those two functions under oDBDisplay.

Paul.

Zumwalt
17
Years of Service
User Offline
Joined: 1st Feb 2007
Location: Tampa, FL
Posted: 22nd Feb 2007 14:27
Quote: "
As for oDBDisplay giving you access to the Direct3D device, it does return an actual address to an IDirect3D9 or IDirect3DDevice9
"


How do we grab this address?
thierry st malo
19
Years of Service
User Offline
Joined: 7th Nov 2005
Location: Saint-Malo, France
Posted: 22nd Feb 2007 15:34
Thanks, Paul.
Extremely helpful, as always .
Thierry

Login to post a reply

Server time is: 2024-11-19 11:42:15
Your offset time is: 2024-11-19 11:42:15