Click here to Skip to main content
15,913,758 members
Home / Discussions / C#
   

C#

 
AnswerRe: Exception in calling Socket.Accept Pin
eric feng12-May-06 12:34
eric feng12-May-06 12:34 
GeneralRe: Exception in calling Socket.Accept Pin
e_LA15-May-06 3:49
e_LA15-May-06 3:49 
QuestionRemove empty Items from checkedListBox Pin
mm31011-May-06 1:42
mm31011-May-06 1:42 
AnswerRe: Remove empty Items from checkedListBox Pin
JoeSharp11-May-06 1:59
JoeSharp11-May-06 1:59 
QuestionAdding a panel of specific size to a tabpage Pin
praveenqwe11-May-06 1:14
praveenqwe11-May-06 1:14 
AnswerRe: Adding a panel of specific size to a tabpage Pin
Wjousts11-May-06 2:22
Wjousts11-May-06 2:22 
GeneralRe: Adding a panel of specific size to a tabpage Pin
praveenqwe14-May-06 22:52
praveenqwe14-May-06 22:52 
QuestionDirectX with Windows.Forms controls performance Pin
241411-May-06 0:50
241411-May-06 0:50 
Hello, could use a bit of general advice. I’m working on a C# program with Managed DirectX visualization. The main program window is divided into the visualization part and some generic controls from System.Windows.Forms for input – text boxes, drop down combos, grids and the like.

The DirectX visualization is quite complex so the typical frame rate is quite low especially on lower-end machines. My problem is that input becomes very sluggish and unresponsive as the frame rate drops. In extreme cases, pressing a key will cause a repeating string of characters to appear in the text box after significant delay. The frame rate I don’t really care about but the input has to stay responsive even on slower machines.

My guess is that the rendering is prioritised over the handling of control evens such as typing text. I have tried two solutions: one is peppering the main rendering loop with Application.DoEvents() to process the input control events. This had almost no effect.

Second is separating the rendering into a different thread to the main UI (essentially the render loop runs in a separate thread). However, even after setting the thread priority on the render thread to lowest and on the UI to highest I still get very sluggish input. I’ve removed all of the lock() statements to make sure the threads were not waiting on each other with no effect.

Didn’t have much luck finding a solution on the net – although surely this must be a very common problem. Can anyone suggest a solution - preferably one that doesn’t involve multithreading or writing DirectX input controls?

Thanks very much for any suggestions, apologies if I've posted in the wrong forum.

AnswerRe: DirectX with Windows.Forms controls performance Pin
Andy Moore11-May-06 3:37
Andy Moore11-May-06 3:37 
GeneralRe: DirectX with Windows.Forms controls performance Pin
241411-May-06 3:54
241411-May-06 3:54 
GeneralRe: DirectX with Windows.Forms controls performance Pin
Andy Moore11-May-06 6:46
Andy Moore11-May-06 6:46 
GeneralRe: DirectX with Windows.Forms controls performance Pin
241411-May-06 7:17
241411-May-06 7:17 
GeneralRe: DirectX with Windows.Forms controls performance Pin
Andy Moore11-May-06 7:38
Andy Moore11-May-06 7:38 
GeneralRe: DirectX with Windows.Forms controls performance Pin
241411-May-06 8:12
241411-May-06 8:12 
GeneralRe: DirectX with Windows.Forms controls performance Pin
Andy Moore11-May-06 8:21
Andy Moore11-May-06 8:21 
QuestionBuild Windows application from command prompt Pin
KishoreT11-May-06 0:45
KishoreT11-May-06 0:45 
AnswerRe: Build Windows application from command prompt Pin
Stefan Troschuetz11-May-06 0:58
Stefan Troschuetz11-May-06 0:58 
GeneralRe: Build Windows application from command prompt Pin
KishoreT11-May-06 1:33
KishoreT11-May-06 1:33 
GeneralRe: Build Windows application from command prompt Pin
Stefan Troschuetz11-May-06 3:33
Stefan Troschuetz11-May-06 3:33 
QuestionProblem in Passing structure by reference in c# Pin
analytiks11-May-06 0:39
analytiks11-May-06 0:39 
AnswerRe: Problem in Passing structure by reference in c# Pin
S. Senthil Kumar11-May-06 5:11
S. Senthil Kumar11-May-06 5:11 
QuestionUse c# dll in vb.6 Pin
Cliffer11-May-06 0:27
Cliffer11-May-06 0:27 
AnswerRe: Use c# dll in vb.6 Pin
Dave Kreskowiak11-May-06 3:45
mveDave Kreskowiak11-May-06 3:45 
AnswerRe: MVC game design question Pin
Robert Rohde11-May-06 1:01
Robert Rohde11-May-06 1:01 
Questionstrange problem Pin
rah_sin10-May-06 23:14
professionalrah_sin10-May-06 23:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.