Draw on TabControl

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I’m new to .NETCF. I need to draw graphics on a tabpage in a TabControl based on the timer ticks. Can I use CreateGraphics method to create a graphics object then draw on the tabpage? If yes, how do I to do it? If no, how do I deal with this kind problem? Can you show me a sample
Any help would be greatly appreciated

Haobi
 
It works great. I really appreciate you
Haobi

----- Mark Arteaga wrote: ----

Use the Paint event of the TabPage. Then on the tick event of your timer invalidate() the TabPage
Something like this

..
tabPage1.Paint +=new PaintEventHandler(tabPage1_Paint)
..

private void timer1_Tick(object sender, System.EventArgs e

tabPage1.Invalidate()


private void tabPage1_Paint(object sender, PaintEventArgs e

//YOUR CUSTOM PAINTING GOES HERE. USE e.Graphics TO PAIN



//Mark
 
Back
Top