Results 1 to 3 of 3

Thread: Slow

  1. #1

    Thread Starter
    Lively Member TB's Avatar
    Join Date
    Feb 2001
    Location
    Austria
    Posts
    106

    Unhappy

    I trie to fill out a PictueBox control (for example blue) with the Pset function, it takes days.
    Can I improve the speed of that?

    That is the code:

    For x = 0 to PictureBox.Width-1
    For y = 0 to PictureBox.Height-1
    Pset (x,y) , 0
    Next y
    Next x
    mojo

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Use BitBlt. BitBlt has been explained millions of times on this forum already so I can't be botherd to type it all out again Go look for threads on BitBlt, it's easy enough to use.
    Harry.

    "From one thing, know ten thousand things."

  3. #3
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Yep. Also there's some BitBlt samples on my website

    ...and especially in your case (to fill a picturebox) you can use the following code:

    Code:
       'Fills Picture1 with blue pixels :D
       Picture1.BackColor = RGB( 0, 0, 255 )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width