Basic Dot Net Question:

Download Job Interview Questions and Answers PDF

How do you trigger the Paint event in System.Drawing?

Dot Net Interview Question
Dot Net Interview Question

Answer:

Invalidate the current form, the OS will take care of repainting. The Update method forces the repaint.

Download Dot Net Interview Questions And Answers PDF

Previous QuestionNext Question
I am constantly writing the drawing procedures with System.Drawing.Graphics, but having to use the try and dispose blocks is too time-consuming with Graphics objects. Can I automate this?With these events, why wouldn’t Microsoft combine Invalidate and Paint, so that you wouldn’t have to tell it to repaint, and then to force it to repaint?