|
-
Dec 9th, 2002, 12:01 AM
#1
Thread Starter
New Member
Stupid Questions about Image and SWF
Ok, I am getting back into VB Programming after a few years of nothing, and I unfortunatly lost all my Program Source files for reference.
Anyway, stupid question.
I want to get a Command Button Click to load a picture into my "Image" but it wont work. I want it to load the image from a folder in my Project folder. Meaning I dont want to have to link it to something like e:\games\prog\whatever.jpg Instead, I want it like prog\whatever.jpg
Same goes for my Flash video also, I can do the long link to it (e:\games\prog\whatever.swf) and it works, but when putting just prog\whatever.swf I get a Missing Object error.
-
Dec 9th, 2002, 04:06 AM
#2
KING BODWAD XXI
-
Dec 11th, 2002, 03:56 AM
#3
Thread Starter
New Member
Could you give me the exact code? Sorry, but I just cant seem to remember anything...
-
Dec 11th, 2002, 04:04 AM
#4
KING BODWAD XXI
-
Dec 11th, 2002, 04:14 AM
#5
Thread Starter
New Member
Hmmm...
Ok, here's what I have tried, just to be clear.
I first started by trying
Image1.Picture = "logo.jpg"
with that, and variations of it, I get a Type Mismatch Error.
I also tried
Image1.Picture = (logo.jpg)
With that I get a "Object Requiered" error.
If I simply put in App.path & "\Whatever.jpg", I get a Expected Expression Error.
If I try Image1.Picture = App.path & "\Whatever.jpg"
I get another Type Mismatch Error.
-
Dec 11th, 2002, 04:22 AM
#6
VB Code:
Set Image1.Picture = LoadPicture(App.Path & "\logo.jpg")
-
Dec 11th, 2002, 04:27 AM
#7
Thread Starter
New Member
Awsome, that works perfectly. Thanks for the help.
Hopfully the old code I knew will come back to me unlike this little bit.
One last question though. If I had, say for example, multiple command buttons loading a diferent picture in the Image1, does it in a way, un-load the old image? Or would an older PC get bogged down if the person where to be loading a lot of pictures this way?
-
Dec 11th, 2002, 07:45 AM
#8
KING BODWAD XXI
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
|