tags:

views:

66

answers:

1

ok so i started making a 3d game. then i stopped for a some time and installed win7. now i wanted to keep working on it just to discover that the code freezes! on xp i render the view onto the form. and the game loop AND all the game forms run on the same thread!

this WORKED on xp. now in win7 the 3d loop still works the same BUT all the forms dont want to work on the same thread with it.

i remember something in vb that was called "doevents" not sure if there is something like this in c#...

now i tryed to repaint all the forms in the main loop. now all the labels update BUT the forms dont get key input and after a while freeze until windows tells me my app is stuck(all this and the main loops runs and renders the 3d with no problem)

i dont get why all worked on the same thread in xp and in win7 looks like ill need to make a threading system for the forms!

and yes the code WORKS on xp!

+2  A: 

If you must run everything on the same thread, you could use:

Application.DoEvents();

this is equivalent to "DoEvents" in VB.NET. Hope that helps...

Robert Seder
well holy crap. i known there was something like that!funny how it worked without this in xp!works like a dream now tnx!
kalix