|
-
May 27th, 2001, 02:17 AM
#1
Thread Starter
Addicted Member
Using DrawEdge in a UserControl
I've created a usercontrol that acts as a container, and draws a border using the DrawEdge API (to give that sunken Panel effect).
The only problem is that, in the Paint event I have to call UserControl.cls to make sure the DrawEdge is displayed correctly. This make the border flicker.
I've tried using the LockWindowUpdate to stop the flicker, but because it is a container, the LockWindowUpdate effects the drawing of the controls inside it.
Has anyone got any ideas how I can stop the flicker?
Cheers
-
May 20th, 2002, 08:29 PM
#2
I had a case of this, but when I looked through the code I realised that 'UserControl.Refresh' were executed twice (because I had the Resize Sub point to another sub, which had UserControl.Refresh in it), and this caused the flicker. I took the first one out andno flicker.
-
May 21st, 2002, 06:06 AM
#3
Frenzied Member
If you set the AutoRedraw property to True and then refresh then control after all your drawings are done it shouldn't flicker.
-
May 21st, 2002, 06:40 AM
#4
Thread Starter
Addicted Member
Cheers Dreamlax and Rick.
I'll give your suggestions ago.
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
|