|
-
Apr 21st, 2023, 07:12 AM
#1
Thread Starter
Hyperactive Member
A Control Paint (For .CreateGraphics) question
Consider you are updating a bargraph value (Vertical ProgressBar or in this case a colorful PictureBox inside of a Panel) through a timer.
By pressing a button (Or a CheckBox1.Checked = True condition) Timer code checks/decides whether to show the Percentage inside of the bargraph (.CreateGraphics.DrawString) or All 10% division ticks lines on bargraph (Many .CreateGraphics.DrawLine s)
2 main problems:
- In beginning the timer ui updating section, I worte .CreateGraphics.Dispose() to perform a sort of refresh/update in case of resizing the form. But due to timer interval ticks keep flickering. How can we avoid that?
- I learned from John McIlhinney to maintain all graphic creating codes inside the control's Paint Event. How can we do so at first place (Not familiar with 'e' operator)? I'm suspected that flickering still happens because decision is still be making.
Thanks in advance.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|