PC Review


Reply
Thread Tools Rate Thread

DirectX and windows controls

 
 
Marko Bozikovic
Guest
Posts: n/a
 
      6th Feb 2007
Hi all,

I'm new to .NET, and I have a silly little problem. My application's layout is
simple: a window with one splitter with a treeview control in the left pane
and a Panel for rendering a DirectX scene in the right pane.

My problem is the KeyDown event. Before adding splitter and treeview,
everything worked fine - rendering panel received key events (I'm interested
in up/down/left/right/pageup/pagedown)

However, after I have added splitter and the treeview, my rendering panel
doesn't receive KeyDown events for up/down/left/right (they seem to be routed
to TreeView controls (render panel still receives pageup/pagedown events)

I'm aware of the focus problems with Panels, and I set main form's
ActiveControl to my render panel in panel's MouseDown event handler (actually,
this seems to set *splitter's* ActiveControl property, but it seems to be
working). The treeview control loses focus (as expected) and my render panel
handles pageup/pagedown keys. But, if I press one of up/down/left/right keys,
the treeview steals focus and responds to the key event.

I have even added a handler for PreviewKeyDown event in the rendering panel,
and it gets called for all keypresses, but I still don't know how to prevent
treeview from stealing focus.

Any ideas? (I'm using .NET 2.0)

Thank you,
--
Marko
ICQ: 5990814

I'm not under the alkafluence of inkahol
that some thinkle peep I am.
It's just the drunker I sit here the longer I get.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I install DirectX 9.0c over DirectX 9.0b (my current versio KiotieII Windows XP Games 2 7th Apr 2009 09:31 PM
windows form controls in place of web controls in .net 2.0 =?Utf-8?B?QnJ5YW4gWk0=?= Microsoft ASP .NET 2 4th Jun 2005 12:52 AM
Embedding Windows/smart client controls in a Web Controls page Martin Eyles Microsoft ASP .NET 2 21st Feb 2005 05:09 PM
DirectX question: how resolve: using Microsoft.DirectX; dave Microsoft C# .NET 1 10th Oct 2003 06:06 PM
DirectX 9.0A end-user runtime and Managed DirectX. Tom Microsoft Dot NET 0 3rd Jul 2003 03:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:24 PM.