is it possible to test the .Picture property of an image box to see th name of the picture file?
Thanks in advance
Printable View
is it possible to test the .Picture property of an image box to see th name of the picture file?
Thanks in advance
no.
Bugger!
hmm ... how come.. ?
when u load a picture into a pic box, u obv. know the file name ?
what is the problem u encounter?
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?
Cant you load the pictures into an Array of pictures, then iterate that way??
when u load a picture, save the name into a var, compare the var before loading a new pic.Quote:
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?
for the flickering, try this
VB Code:
Option Explicit Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwnd As Long) As Long Public Sub LockWindow(hwnd As Long) 'Låser et vindu slik at det ikke flimrer når data blir oppdat. LockWindowUpdate hwnd End Sub Public Sub UnlockWindow() 'Frigjør vinduet igjen. LockWindowUpdate 0 End Sub Private Sub Command1_Click() LockWindowUpdate Me.hwnd 'load picture UnlockWindow End Sub
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.
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.