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 .NET / Using with multiple forms?

Author
Message
code master
20
Years of Service
User Offline
Joined: 4th Dec 2003
Location: Illinois
Posted: 8th Mar 2009 16:44
I need separate 3d viewports on multiple forms... but only one will be shown at a time, as far as I can see. Is there a way to have multiple DGDK controls but only one reference to the DGDK engine?

Or can I move a control to a new form by just copying it somehow, without reinitializing it?

Thanks,
Codemaster


Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 8th Mar 2009 22:54
You could have all the viewports on one form, and then copy the images to the other forms using GDI.

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 11th Mar 2009 03:56
I concur, and to be fare, the DarkDGK libraries will not permit me to allow multiple viewports to be handled in this way. Unless your affiliated with the DirectX device to gain access to the viewport or rendering windows, this is not actually possible using the current DarkGDK.NET class library functions.

Paul.

code master
20
Years of Service
User Offline
Joined: 4th Dec 2003
Location: Illinois
Posted: 14th Mar 2009 18:15
Thanks for the responses!

Do you have a link to more information about how to copy the image with GDI?
I've been googling it a bit and haven't found anything.

Thanks,
Codemaster

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 15th Mar 2009 12:00
Make a class which inherits from the System.Windows.Forms.Panel class, and override its paint event. This event passes in a System.Drawing.Graphics instance, so use that to copy images from the DBPro window. At the end of each paint event, invalidate the panel again, so it will repaint.

To reduce flicker, override the WndProc, and stop WM_ERASEBGND events from being passed on.

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!

Login to post a reply

Server time is: 2024-11-21 10:40:11
Your offset time is: 2024-11-21 10:40:11