Click here to Skip to main content
15,887,776 members
Home / Discussions / C#
   

C#

 
GeneralRe: Com port and process Pin
Rahul.RK12-Sep-07 22:22
Rahul.RK12-Sep-07 22:22 
QuestionHow to process calls to a Control on a separate thread? Pin
ctoma200512-Sep-07 21:18
ctoma200512-Sep-07 21:18 
AnswerRe: How to process calls to a Control on a separate thread? Pin
Mark Swaanenburg12-Sep-07 22:22
Mark Swaanenburg12-Sep-07 22:22 
GeneralRe: How to process calls to a Control on a separate thread? Pin
ctoma200512-Sep-07 22:32
ctoma200512-Sep-07 22:32 
GeneralRe: How to process calls to a Control on a separate thread? Pin
Mark Swaanenburg12-Sep-07 22:43
Mark Swaanenburg12-Sep-07 22:43 
GeneralRe: How to process calls to a Control on a separate thread? Pin
ctoma200513-Sep-07 3:06
ctoma200513-Sep-07 3:06 
GeneralRe: How to process calls to a Control on a separate thread? Pin
Mark Swaanenburg13-Sep-07 4:09
Mark Swaanenburg13-Sep-07 4:09 
GeneralRe: How to process calls to a Control on a separate thread? Pin
Luc Pattyn13-Sep-07 1:10
sitebuilderLuc Pattyn13-Sep-07 1:10 
Hi,

I have several comments:

1.
You can ask a timer to tick every 5 msec, that does not mean it will do that. Read my
timer article!

2.
If you use a Windows.Forms.Timer you will get ticks on the UI thread automatically,
saving half of the messages and avoiding the need for an explicit Invoke()

3.
PictureBox is not my favorite Control, it has limited functionality and unknown overhead.

4.
I guess your painting action is too expensive; I would suggest to optimise the paint
action, possibly by reducing the number of controls. In general the lightweight approach
gives the maximum performance, in its extreme form it means ypu use one Control (a Panel),
do all keyboard/mouse event dispatching yourself, and organize the paint event yourself,
carefully watching the invalidate region. IMO just adding lots of Controls is not the right
way to create a game.

Smile | :)


Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


QuestionDatabase retrieving problem Pin
Nishad8512-Sep-07 20:59
Nishad8512-Sep-07 20:59 
AnswerRe: Database retrieving problem Pin
Paul Conrad14-Sep-07 19:05
professionalPaul Conrad14-Sep-07 19:05 
Questioninstance of object in a class Pin
bluetx12-Sep-07 20:58
bluetx12-Sep-07 20:58 
AnswerRe: instance of object in a class Pin
pmarfleet12-Sep-07 21:45
pmarfleet12-Sep-07 21:45 
AnswerRe: instance of object in a class Pin
Parwej Ahamad12-Sep-07 21:52
professionalParwej Ahamad12-Sep-07 21:52 
QuestionDataGridView SelectionBackColor and Transparency Problem Pin
mertkan6512-Sep-07 20:55
mertkan6512-Sep-07 20:55 
QuestionUse managed DLL in unmanaged and managed environment Pin
mpavas12-Sep-07 20:08
mpavas12-Sep-07 20:08 
AnswerRe: Use managed DLL in unmanaged and managed environment Pin
Parwej Ahamad12-Sep-07 20:29
professionalParwej Ahamad12-Sep-07 20:29 
GeneralRe: Use managed DLL in unmanaged and managed environment Pin
mpavas12-Sep-07 21:01
mpavas12-Sep-07 21:01 
QuestionWindows Services Pin
Elizma12-Sep-07 19:50
Elizma12-Sep-07 19:50 
AnswerRe: Windows Services Pin
Parwej Ahamad12-Sep-07 20:36
professionalParwej Ahamad12-Sep-07 20:36 
QuestionDatagridview Pin
iet200012-Sep-07 19:37
iet200012-Sep-07 19:37 
AnswerRe: Datagridview Pin
Parwej Ahamad12-Sep-07 20:19
professionalParwej Ahamad12-Sep-07 20:19 
AnswerRe: Datagridview Pin
C#Coudou12-Sep-07 20:20
C#Coudou12-Sep-07 20:20 
QuestionXML and Generic List Pin
satyaki mishra12-Sep-07 19:25
satyaki mishra12-Sep-07 19:25 
AnswerRe: XML and Generic List Pin
Pete O'Hanlon12-Sep-07 21:59
mvePete O'Hanlon12-Sep-07 21:59 
Question[C#] PageBreak in Excel Pin
kurisutofuJP12-Sep-07 19:22
kurisutofuJP12-Sep-07 19:22 

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.