472,122 Members | 1,421 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,122 software developers and data experts.

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 1064

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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.