|
-
Oct 27th, 2001, 04:34 PM
#1
Thread Starter
Frenzied Member
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
-
Oct 27th, 2001, 04:39 PM
#2
-= B u g S l a y e r =-
-
Oct 27th, 2001, 04:42 PM
#3
Thread Starter
Frenzied Member
There are 3 types of people in this world.........those that can count, and those that can't.
Blobby
-
Oct 27th, 2001, 04:46 PM
#4
-= B u g S l a y e r =-
hmm ... how come.. ?
when u load a picture into a pic box, u obv. know the file name ?
what is the problem u encounter?
-
Oct 27th, 2001, 04:53 PM
#5
Thread Starter
Frenzied Member
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
-
Oct 27th, 2001, 04:57 PM
#6
PowerPoster
Cant you load the pictures into an Array of pictures, then iterate that way??
-
Oct 27th, 2001, 05:06 PM
#7
-= B u g S l a y e r =-
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:
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
-
Oct 27th, 2001, 05:11 PM
#8
Thread Starter
Frenzied Member
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
-
Oct 27th, 2001, 05:14 PM
#9
Thread Starter
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|