|
-
Nov 27th, 2001, 03:32 PM
#1
Thread Starter
Fanatic Member
LoadResPicture()
Hi kids.
I wonder if I could also use the VB LoadResPicture() function to load JPG, GIF files from a .RES file???
The manual says that a .RES files can only support .BMP and .ICO
-
Nov 29th, 2001, 05:21 PM
#2
That's correct - no jpg.
There are other controls that you use to handle multiple images - the Kodak ImgEdit &ImgAdmin controls that come with VB 6.0
Go here for sample code from the guys who wrote the controls:
http://www.eistream.com/support_pro/...ample_code.htm
-
Nov 30th, 2001, 01:48 AM
#3
Thread Starter
Fanatic Member
I know, but I want to embed certain graphics in my app.
Using the classical methods (images, pictureboxes, ...) it takes a long time before the whole thing is loaded.
When using a resource file, the load time would reduce!
Now I found out that I also can use LoadResData(), then assigning it to a Byte array, saving it to a file and then restoring the image by reading the file with LoadPicture().
Any other (faster) methods available?
-
Nov 30th, 2001, 02:39 AM
#4
PowerPoster
I try to shy away from storing images in RES files and store them with the program (in a directory called graphics for example).
You can load them at the beginning of the program (using a splash screen to keep the user amused). It makes updating the program easier and makes the .exe much smaller.
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
-
Nov 30th, 2001, 02:35 PM
#5
Thread Starter
Fanatic Member
I don't want the user to be able to see my graphics !!!!
-
Nov 30th, 2001, 09:17 PM
#6
PowerPoster
You could always save them as data001.dat, data002.dat and then they've no idea they only have to rename the file to .jpg to view them.
Why don't you want people to see the graphics anyway, they're going to see them in the program - if they want them, they need only do a screen capture....
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
-
Dec 1st, 2001, 07:45 AM
#7
Thread Starter
Fanatic Member
It's a GUI to manipulate our domotics system.
I don't want the user to be able to change all the graphics which I have spent many hours to create them (like: icons, backgrounds, ...)
I experimented with LoadResData in combination with file I/O and measured the time to load & save graphics files (about 15Kb each) with GetTickCount(). This API reported most of the time 0ms. So, I presume that not many CPU time has been lost...not?
Result: I will use LoadResData to import BMP, GIF, JPG, ... with a maximum size of 64Kb (otherwise it will be slower).
Advantage: My app won't take a long time to start up.
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
|