|
-
Nov 2nd, 2000, 12:16 AM
#1
Thread Starter
Addicted Member
I have a transpearent form thathas a picture image.
I had a timer that will change the form's image at appropriate times.
If I make an exe of the code, only the form's picture I set at design time is included, the other two images are not.
This is the code I used to set the form's picture to other pictures:
Me.Picture = LoadPicture("C:\WINDOWS\SYSTEM\NTLocked.jpg")
'as you can see, I am using a path to the images, I know there must be a better way.
How can I keep all three image files inside the EXE ?
I appreciate any time and efforts,
Daniel Christie
-
Nov 2nd, 2000, 03:41 PM
#2
Fanatic Member
try including the gifs in picboxes...
how about having 2 more picboxes and put the images there and then save ur project, then copy the .frx of the form and open ur form in notepad so tht u can copy the address locator... ooops...
sorry.
--------------------------
do this:
put 2 picboxes in ur form and put the pics in them.
save ur project.
rename ur form1.frx to something.frx
open the form.frm in notepad
and copy the foolowing lines:
Code:
...
Picture = "Form1.frx":0000
...
Picture = "Form1.frx":274FA
...
Picture = "Form1.frx":D74DD
...
then u can open ur form and take out the new picboxes and then save ur project.
then last step is to change ur load to:
picture1.picture = loadpicture("Form1.frx":0000) 'first
picture1.picture = loadpicture("Form1.frx":274FA) 'second
picture1.picture = loadpicture("Form1.frx" 74DD) 'third
and u just have to replace ur new form1.frx
with ur old form.frx... then compile.... it should work...
if u need any help... ask!
-
Nov 2nd, 2000, 03:42 PM
#3
Fanatic Member
whhops the are the same as : and D
-
Nov 2nd, 2000, 03:51 PM
#4
Fanatic Member
picture1.picture = loadpicture("Form1.frx":0000) 'first
picture1.picture = loadpicture("Form1.frx":274FA) 'second
picture1.picture = loadpicture("Form1.frx" 74DD) 'third
is...
picture1.picture = loadpicture("Form1.frx":0000) 'first
picture1.picture = loadpicture("Form1.frx":274FA) 'second
picture1.picture = loadpicture("Form1.frx": D74DD) 'third
-
Nov 2nd, 2000, 04:25 PM
#5
-
Nov 2nd, 2000, 04:53 PM
#6
Fanatic Member
ooops...
the stuff i wrote in the above does not work!!!!
-
Apr 16th, 2001, 04:36 AM
#7
New Member
You could just have three or four Pictureboxes in a control array with their .Visible property set to False if required, on your form.
Then when you need to change the form's image, just set it to the picturebox's.
Form1.Picture = Picture(1).Picture
Form1.Picture = Picture(2).Picture
-
Apr 16th, 2001, 12:10 PM
#8
Fanatic Member
thats a good one and it works much better because you can load a picture into a form and so on.... then the form cab read it.
i coulnt get my samples to work so thanks for the help trickster.
-
May 11th, 2001, 06:24 AM
#9
Addicted Member
-
May 11th, 2001, 06:52 AM
#10
Fanatic Member
Just load all the pictures in pictureboxes and have one picturebox for the 'animation', then use picAnimation.Picture = picFrame1.Picture.... couldn't be easier! 
An ImageList requires you to use the ComCtl.ocx, which is an extra 1 MB when distributing. So unless you're using the other components too it's just a waste of space...
Teaudirenopossum.Musasapientumfixaestinaure.
(I can't hear you. There's a banana in my ear)
-
May 11th, 2001, 11:32 AM
#11
Fanatic Member
Another Sollution
hey how about having one form that only has images... imgboxes or picboxes then all you need to do is:
picSomething.Picture = frmImges.picSmile.Picture
you can also do:
frmImages.picTemp.Picture = LoadPicture(App.Path & "/myPic.xxx")
'where xxx is a valid extention...
'then do,
picLoaded.Picture = frmImages.picTemp.Picture
does that make sense?
sorry about the confusion, but when i first answered this post i was thinking about something else. Now i know exactly what you mean because i did something similar... except mine also allowed people to load pictures into the program... and the program had around 50 unique images... all stollen from the internet, but dont worry its just a school project, nothing commercial.
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
|