Results 1 to 9 of 9

Thread: Testing presence of Image in imagebox

  1. #1

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512

    Testing presence of Image in imagebox

    is it possible to test the .Picture property of an image box to see th name of the picture file?

    Thanks in advance
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    no.
    -= a peet post =-

  3. #3

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512
    Bugger!
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  4. #4
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    hmm ... how come.. ?

    when u load a picture into a pic box, u obv. know the file name ?
    what is the problem u encounter?
    -= a peet post =-

  5. #5

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512

    Peet

    Peet my man.

    My problem is that when scrolling up and down a list (that automatically displays a photo relevant to the line you are.........currently on,On my AMD1.4 its fine but if i put the program on a slower machine, the background shows through for a second while it displays the new cursor lines image. basically causing 'Flicker', pretty badly too!
    As some lines in a batch show the same picture, it would be less noticeable if the pictures that were the same dont get redisplayed (little point if the new image will be the same as that which is currently showing)

    In other words, If the new picture we are about to display is the same as the picture already displaying.....do nothing.

    Dos that make sense?
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  6. #6
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Cant you load the pictures into an Array of pictures, then iterate that way??

  7. #7
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629

    Re: Peet

    Originally posted by Blobby
    Peet my man.

    My problem is that when scrolling up and down a list (that automatically displays a photo relevant to the line you are.........currently on,On my AMD1.4 its fine but if i put the program on a slower machine, the background shows through for a second while it displays the new cursor lines image. basically causing 'Flicker', pretty badly too!
    As some lines in a batch show the same picture, it would be less noticeable if the pictures that were the same dont get redisplayed (little point if the new image will be the same as that which is currently showing)

    In other words, If the new picture we are about to display is the same as the picture already displaying.....do nothing.

    Dos that make sense?
    when u load a picture, save the name into a var, compare the var before loading a new pic.

    for the flickering, try this

    VB Code:
    1. Option Explicit
    2. Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwnd As Long) As Long
    3.  
    4. Public Sub LockWindow(hwnd As Long)
    5.     'Låser et vindu slik at det ikke flimrer når data blir oppdat.
    6.     LockWindowUpdate hwnd
    7. End Sub
    8.  
    9. Public Sub UnlockWindow()
    10.     'Frigjør vinduet igjen.
    11.     LockWindowUpdate 0
    12. End Sub
    13.  
    14. Private Sub Command1_Click()
    15.     LockWindowUpdate Me.hwnd
    16.     'load picture
    17.     UnlockWindow
    18. End Sub
    -= a peet post =-

  8. #8

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512

    Guys

    Thanks for the info guys.
    FYI, I already use LockWindowUpdate but it doesnt seem to make any difference. As soon as you release the lock (LockWindowUpdate(0)) Windows kicks in and refreshes anyway.
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  9. #9

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512

    Array of pictures

    The pictures would take up too much memory to load into an array im afraid. Im trying to keep everything stored as a number which is then decoded into what it really is to keep space in memory to a maximum.
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

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