Ask your own question, for FREE!
Computer Science 22 Online
OpenStudy (poopsiedoodle):

@kainui

OpenStudy (poopsiedoodle):

http://pastebin.com/kaiXbWpT Near the bottom of the Main Form code is all the drawstrings and whatnot.

OpenStudy (poopsiedoodle):

OpenStudy (kainui):

ok what did you say was going wrong again I forget something like it's drawing the last string on top or underneath something?

OpenStudy (poopsiedoodle):

The last string is being drawn, and then for some reason when it's done drawing the strings, they all get re-drawn, and the last one disappears.

OpenStudy (kainui):

Hmm I looked but I don't do C# so I couldn't find your error. Two bits of opinion, I personally don't like when { are put on their own line, it makes the code a lot longer and harder to read through personally. Other thing is, you should consider using switch statements instead of all these else if statements. It also looks like you're repeating the same exact code within each of these else if statements, I suggest just making a single string, and then setting the string like `s="♛"` in the statements, then before and after all these else if statements just put this code: ``` Graphics g1 = t.CreateGraphics(); //else if stuff here setting the string s g1.DrawString(s, new Font("Arial", 25), Brushes.Black, new Point(11, 16)); ```

OpenStudy (poopsiedoodle):

ye, just started working on putting it all into one method while you were typing that :p

OpenStudy (kainui):

cool, yeah I'll give it another look if you can't find it. I suggest trying to break your code itself in simple ways, I feel like since it's the last thing in your list it's some kind of off by 1 error in an array or something funky, that's my guess lol

OpenStudy (poopsiedoodle):

Well, I added t.refresh before calling the draw function, and now they stick, but it seems that the program is stuck in an infinite loop of refreshing and it won't let me do anything else.

OpenStudy (poopsiedoodle):

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!