DrawString a digital clock in a pictureBox / transparent label

G

Guest

Hi again,
I'm trying to draw a digital clock in the corner of a picturebox whenever a
particular tabpage is in focus. I either need to be able to make the clock
keep real time (I can get it to draw when the page loads, but it won't
"tick") or I need to be able to draw a transparent label background (I can
get the clock working on a solid color label).
Thanks again for everyone's help!
Melanie
 
M

Markus Stoeger

melanieab said:
Hi again,
I'm trying to draw a digital clock in the corner of a picturebox whenever
a
particular tabpage is in focus. I either need to be able to make the
clock
keep real time (I can get it to draw when the page loads, but it won't
"tick")

You could use a timer to make the clock "tick". There are several timer
classes in the .NET framework. Have a look at the
System.Windows.Forms.Timer class. You can use it to fire an event like once
every second and update (redraw) the clock with that.

hth,
Max
 

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

Top