I have been working on a card game (called Uno) for past few days.
Language used : C# 2.0
When I start a new game, a dialog window pops up asking the name of
the player. I enter the name, and then cards are distributed to the
computer and player. Then I set a flag true, to signal that the client
area is dirty - please paint it. There is a timer which check for this
flag and if it finds it true, it invalidates the form.
Concept :-
.... timer_tick handler code...
{
if (true == paintFlag)
{
...form.Invalidate() ;
paintFlag = false;
}
}
This should invoke the painting handler of my form.
Problem:
I see only the portion of the form painted where the first pop up
window was located (usually in the middle of the window), after the
pop up window is gone.
Why isn't the whole form painted? Or does it? If yes, why are the
cards not visible?
If you want, have a look at the code here -
http://cnayan.googlepages.com/2007-0...apshot-Uno.zip
I know the code in unoptimized right now. :)
Thanks in advance! :)
Nayan