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 / [GDK.NET] DarkGDK. IO. Keyboard. Space

Author
Message
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 6th Dec 2008 16:39
How to use that?

I\\\'m doing:


and that dont work. Are I\\\'m doing wrong?

Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.
Mighty Batsonator
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Atmosoft Ltd. World Headquarters
Posted: 6th Dec 2008 17:51
I'm also having issues with the Input functionality. I've tried all the following to get something different to happen on-screen, and nothing's worked yet.







Anybody?

-- Coding your worst nightmare --
Jimmy 9Toes
15
Years of Service
User Offline
Joined: 24th Nov 2008
Location:
Posted: 6th Dec 2008 18:01
The problem is that the viewport control is embeded on the form and it's not seeing the keystrokes or the mouse.

You have to set the "Embeded" property to false.

Yes THEE Jimmy9Toes
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 6th Dec 2008 18:14 Edited at: 6th Dec 2008 18:15
This has always been a problem, and I've spoken with TGC about it. The problem is to do with how DirectX Input is handled when the control sits in a form. I actually intercept all Windows messages and handle them correctly, but DX input isn't handled through the standard Windows messaging system, and therefore, I cannot catch the input requests.

Suffice to say, I understand that this does not pose an issue with full screen applications. If you need to handle keyboard input, please use the form events in the usual way.

I'll try to have this issue resolved asap though.

Paul.

Mighty Batsonator
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Atmosoft Ltd. World Headquarters
Posted: 6th Dec 2008 18:43
Alright, I've reverted to not embedding the control in a Windows Form, instead utiising the GDK's own default window. This has solved my issues, and actually runs faster than my Form did.

-- Coding your worst nightmare --
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 6th Dec 2008 19:20
Jimmy: When I set the Embeded to false it works, but then I have a window extra...

Paul: Is there a way we can start the application without using a form?

Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.
Argon Knight
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Gastonia, NC, USA
Posted: 6th Dec 2008 20:12
Along with a viewport control, could you offer us a form with all the hooks and viewport embedded? I've already got a standard one that I built for managed dx, but I have to say there was quite a lot it has to handle simply because the winforms grab the messages first.

maybe like FrmDarkGDKWindow?
kBessa
17
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 6th Dec 2008 22:49
Niels,

As I said, you may still use everything as it was used in the past, that was how I done it in the samples for my plugins. You might want to take a look at them.

As APEX said, DirectInput + Windows Forms has been a BIG problem since dgdk.net's first release. I tried to have something done also but was unable to do it... That's really sad.

[center][center]
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 7th Dec 2008 02:16
kB - I will look at your plugins....

Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.
Jimmy 9Toes
15
Years of Service
User Offline
Joined: 24th Nov 2008
Location:
Posted: 7th Dec 2008 18:01
Blitz 3D SDK has the same problem. It's definitely a DirectX/Windows thing. One way to get around the problem, (if you want to use the viewport within a form), is to stretc a panel control over the viewport control and make sure it's in front. Then you can respond to mouse movements that way. For processing key strokes you can set the forms "KeyPreview" property to true, and then process the form's key_press, and key_down events.

Yes THEE Jimmy9Toes
Jimmy 9Toes
15
Years of Service
User Offline
Joined: 24th Nov 2008
Location:
Posted: 7th Dec 2008 22:55 Edited at: 7th Dec 2008 23:07
This is strange...

I installed DarkGDK.Net on my personal laptop. The laptop is nothing spectacular. It's a Dell Inspiron 8600 with 1Gb of ram and Windows Vista Ultimate installed. I'm not having this issue on the laptop. Mouse overs and key presses work just fine. This problem only seems to be happening on my desktop computer which is running Windows XP Professional.

Could it be because of Vista using the WPF or something?

Yes THEE Jimmy9Toes
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 8th Dec 2008 00:57
Im using vista... but I managed to remove the form (thanks kB)

Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.
Jimmy 9Toes
15
Years of Service
User Offline
Joined: 24th Nov 2008
Location:
Posted: 8th Dec 2008 06:33 Edited at: 8th Dec 2008 06:34
I created a Visual Studio 2008 project template for creating "Formless" DarkGDK.Net applications in C#. Just import this into your Visual Studio 2008 and you're good to go.

It's attached to this message.

Yes THEE Jimmy9Toes

Attachments

Login to view attachments
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 8th Dec 2008 11:30
Thanks jimmy

Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.

Login to post a reply

Server time is: 2024-09-30 11:22:20
Your offset time is: 2024-09-30 11:22:20