-
SetPixelV Problems
I was using the SetPixelV API call to make a simple particle system (because I wanted to do something that looked cool for a change) but I can't get the pixels to show on the screen. I've tried setting autoredraw to false and to true, and i've tried me.refresh before and after setpixelv and every combination of these things, but nothing works. What is wrong?
-
Are you checking the return value and calling GetLastError to find what went wrong if the call fails?
-
no, but I don't think its an error.
I kinda overexagerated before because I was pissed that it wasn't working.
If I put setpixelv in form_load and use a combo of the things I mentioned before, it will work. But if I move the setpixelv to a command button, then I have to change the combo or it wont work. and the combos that i use seem to vary from project to project. It's really odd, maybe its something with my system.
-
Actually the answer is much more simple; simply put a Me.Show call as the first line in your Form_Load. As it so happens, the form is only shown AFTER Form_Load has been executed. This will stop that behavior.
-
I think his problem is referencing the form later on.
ie., SetPixelV after it has already loaded, messing with the form from another subroutine.
-
exactly, I try to set it for a particle system, but it never shows its ugly, pixeled face!
-
picture1.show 'use picture, see pixelV command
scalemode=vbpixels 'i always use pixels, maybe twips can be your problem
forecolor=vbblack 'example
fillcolor=vbblack
example for star pattern
for x=0 to scalewidth
for y=0 to scaleheight
pixelV(picture1.hdc,scalewidth,scaleheight) dont remember
im missing something i think.
next
next
anyway hope you'll find a sollution.