469,631 Members | 1,305 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

Refreshing a region that drawn in a separate event

Hi,
I'm trying to get a clock to run. What I have is this:

private void toggleOnOff_Click(object sender, System.EventArgs e){}

which looks to see which picture to load in a picturebox. It then says to
either go to

this.notPolar(); or this.Polar(); of which I have:

void notPolar(){} & void Polar(){}

At the beginning of each of these, I Invalidate the picturebox and redraw
the correct screen. Here is where I'd like to place the command to draw the
clock that refreshes a region and ticks. I can draw it, but can't get it to
tick. Or I can add a separate

public void Timer_Tick(object sender,EventArgs eArgs)
{if (sender == Clock){...}}

that draws the ticking clock in a different picturebox that's on top of the
original one. (if I put it in the original one, the this.Polar draws, but is
immediately refreshed (becomes blank) to draw the running clock) But this
second picturebox that's off in a corner, overlaps a wee bit with some other
stuff I draw.

So, is there any way to run the clock on the original picturebox from the
void Polar(){}? Or is there any way to have the public void Timer_Tick say
to draw within a region of the original picturebox (that's drawn in the
separate void Polar())?

Thanks again for all your help!
Melanie
Nov 17 '05 #1
0 1016

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Brian Basquille | last post: by
1 post views Thread by borhan | last post: by
6 posts views Thread by MattB | last post: by
10 posts views Thread by B-Dog | last post: by
1 post views Thread by renu | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.