|
-
Apr 7th, 2000, 04:28 PM
#1
Thread Starter
Junior Member
When I use the SetPixel API with a picture box and the picture box redraws, (via autoredraw or just minimizing and maximizing the form), the pixels that was drawn on the picturebox by the setpixel api disappears.
Why does it do it and how do I stop it from happening?
Might it have something to do with the fact that the api draws on a different graphic level?
"He who laughs at a question is not worth being asked"
RavenCrow

-
Apr 8th, 2000, 12:29 AM
#2
Junior Member
You're right. I had never noticed it (except when playing that Lander game) I fiddled about with all the AutoRedraw and that, but it either doesn't appear in the first place or disappears when hidden. You could always use a timer and GetWindowRect API (or something else) to test if the window is hidden and if so, draw the dot.
I've been of no help whatsoever, but at least I've added another 'post'. Before long I'll be a member. I hope.
-
Apr 8th, 2000, 12:54 AM
#3
Thread Starter
Junior Member
First of all, at least I know I'm not the only one who gets this problem. Second of all, you have been a help in ruling out possibilities as I am creating a acive-x and redrawing it everytime the form activates will slow the performance (espetially because it's a control that can get used up to 20 times and more on one form)
Thanks for atleast trying
"He who laughs at a question is not worth being asked"
RavenCrow

-
Apr 8th, 2000, 01:56 AM
#4
Lively Member
No WAY dudes! On the form/picturebox there's an AutoRedraw property. Set this to true. When you plot your pixels, they will not appear as you plot them, but once you have plotted them all do {window}.Refresh . Then it will make them appear as a "Persistant Bitmap" and not just a "Graphics Method" as the info on the property says. This works with everything, SetPixel, PSet, Line, Box, whatever.
-
Apr 8th, 2000, 02:50 AM
#5
Thread Starter
Junior Member
Thanks
"He who laughs at a question is not worth being asked"
RavenCrow

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
|