Draw on TabControl

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top