|
-
Oct 20th, 2000, 03:06 PM
#1
Thread Starter
New Member
I have been doing a small VB app to plot simple pixel array. The array contains the pixel values. I can blit it once but I would like to refresh the screen with a new array about 30times a second. This is what I do:
1- I set the color table
2- I set the array with pixel values
3- I create the bitmap:
set the infoheader
get the screens device context
create the DIB using the CreateDIBitmap API
4- Using a picture box using the Paint event I draw the bitmap by:
Creating the device context
selecting the bitmap into the dc
applying bitblt
deleting the dc
alone this flow chart works great and I get results but when I put 2,3,4 in loop of lets say 10 frames it seems that the system is working hard on those 10 frames and only displays the last one. Is there a way to improve this or is there another way that this can be done. It's relatively a simple concept. Take a calculated array, blit it to the screen, and refresh the screen everytime the array has changed. Most of the help that I have found only shows loaded bmp files but not array and the code does not apply or does not work. Please help.
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
|