[RESOLVED] VB6 QUESTION: Best Practice for Storing Small Images
Chaps, hopefully an easy VB6 question to answer, I just want to know what you might typically do or what you might suggest as best practice in this case.
I have some small images, jpegs, that are currently stored in the same folder as the binary. The images are used to display a visual state change. They are very small images that might fit on a button, for example.
Currently the control is assigned an initial image at design time and the image might change to a new image or back again as the program determines. Rather than have two controls displaying a different image and hiding each as required, instead I load the new picture into the same control.
This is just an example of what I might do, method not yet determined.
If you were doing the same would you store the resource, in this case a JPG image:
o in the application folder?
o in a sub-folder marked as resources?
o embed the image in a resource file and extract it when required?
o embed the image in a resource file and extract all resources when the application first runs?
It seems to me to be preferable in some way to have all the resources wrapped up in the binary, so the binary alone can be shipped by itself.
I know I could be quite wrong - so I am asking what you would do in this sort of case. I am only talking about small images and limited amount of discrete resources and of course not libraries of PNGs.
Any other suggestion would also be welcomed. I am on a learning path here just wanting to get a feel of what you chaps would do in a similar case.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: VB6 QUESTION: Best Practice for Storing Small Images
It depends how many images and where are you going to use them.
If they are just like icons to be assigned to a button, I would put them in a couple of hidden PictureBoxes (possibly an array).
Also an ImageList can be used.
I prefer that over storing them on resources or in external files.
But, as I said, it depends very much on many factors.
Re: VB6 QUESTION: Best Practice for Storing Small Images
My vote is either the resources or an ImageList control, and extract them as needed (hopefully staying in memory when you do that). If in resources, they'll be fetched from disk when read. If in an ImageList control, they'll be pulled into memory whenever the form with the ImageList is loaded.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Re: VB6 QUESTION: Best Practice for Storing Small Images
Thankyou everyone. I think I will use an imageList to front-load the required images. I will play with the MSCOMCTL.OCX version, then I will adapt the program to use Krool's imageList. I think that sounds like a good enough approach for the moment. The thing about lacking experience is that you just don't know what you don't know.
Sometimes it is good just to hear the things you know being said by others.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: VB6 QUESTION: Best Practice for Storing Small Images
Look up the standard PictureClip control.
It requires a little more development effort to create the composite source bitmap yourself, but it is far more efficient and flexible than imagelist controls.
Re: VB6 QUESTION: Best Practice for Storing Small Images
I would create an external tool that would do stuff like that.
if I want the pictures into the binary. I compile the exe and after that run the tool that will append the pictures onto the exe. of course I also include index/pos. and I do that in "reverse form" so reading backward, that way I use the end of file as starting point to add the index-data.
so, it's easy from the main-exe to know what to do, just read the index-data and after that is just normal stream-loading.
Re: VB6 QUESTION: Best Practice for Storing Small Images
99% of the time I store such project images inside in the EXE itself as a resource. My reasoning is that it makes it very easy to cart everything around.
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
Re: VB6 QUESTION: Best Practice for Storing Small Images
Originally Posted by baka
I compile the exe and after that run the tool that will append the pictures onto the exe.
Baka, that's almost exactly what putting them in the resources does, except that it's the compiler doing the appending rather than some custom written tool. Also, when putting them in resources, you can effectively preserve their original file names for fetching them from resources.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Re: VB6 QUESTION: Best Practice for Storing Small Images
I always found the use of resources in VB6 quite cumbersome. (Anyway I used them at first)
Why to do something in some way when there are other ways that are far easier and handy to achieve the same thing?
That the resources are not loaded into memory until they are actually needed... does that matter in computers after year 2000?
I never used any add-in for handling resources. Maybe that could have helped. But to have to edit and build *.rc *.res files... no thanks.
Just to change one icon you need to go the rabbit hole and do all the process.
I repeat: maybe some add-in could have helped, IDK.
But I prefer to click, and find the file, press OK, and be done. And if I didn't like the new icon, then close the IDE without saving and open it again.
Re: VB6 QUESTION: Best Practice for Storing Small Images
I work like that.
I have external tools that "do stuff".
encryption, sorting, creating data, any media files types and if "editing the pictures" or "changing format" I do that as well, and more.
I usually don't append to exe, but I do create .dat files that is used by the executable.
but if the .dat file is small, under 100MB, why not append to exe? its the same really, except you need to tell where is the start. could be added as the last 4bytes of the file.
the program can work in "2 modes"
mode 1: IDE-mode, that will read the files from folder
mode 2: Compiled-mode, that will read the files from a data-file
the benefit? I can add whatever format, do edits, change, very fast. and since the files are available I can also start up a graphic tool, do changes.
the only thing I need to do is: when I have a new release of the exe, I also run the "builder", that will create the needed files. thats it.
I don't have good experience with the resource editor.
the ui is bad and hard to update stuff. also, if u are dealing with 1000 files, do you really use the resource editor?
learn how to do it right from start, after that its easy when u have a method for it.
Re: VB6 QUESTION: Best Practice for Storing Small Images
Originally Posted by Eduardo-
I never used any add-in for handling resources. Maybe that could have helped. But to have to edit and build *.rc *.res files... no thanks.
I've never used anything but the little Microsoft Add-In for managing my resources, and I've always found it quite easy and intuitive. It just automatically writes things into the Project.RES file, and then the compiler/linker append it to the EXE when compiled. When running from the IDE, it's smart enough to just use the .RES file to get the resources when they're called for. I consider the .RES file as just another piece of source code.
I was once also worried that adding and deleting resources (with the little Add-In) would leave holes in the .RES file (and possibly what's appended to the .EXE file). However, after some investigation, I found that that's not true. When you're in the little Add-In, you do have to hit "Save" to write-out the .RES file ... and, apparently, when that's done, apparently all items, indices, & resource item names are re-organized. It's a well done Add-In. (The only bug I've found is that it clears the clipboard when you load it, but that's true of any Add-In with a toolbar icon. It's really more of a bug in the Add-In system rather than this specific Add-In.)
Addendum: Also, other than for manifests, I've never used it for anything other than "Custom" resources (but possibly in other folders to keep some kind of organization among the resources). I just read them into a Byte array, and then do with them what I want from there.
Last edited by Elroy; May 5th, 2022 at 08:28 AM.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Re: VB6 QUESTION: Best Practice for Storing Small Images
Originally Posted by Elroy
I've never used anything but the little Microsoft Add-In for managing my resources, and I've always found it quite easy and intuitive. It just automatically writes things into the Project.RES file, and then the compiler/linker append it to the EXE when compiled. When running from the IDE, it's smart enough to just use the .RES file to get the resources when they're called for. I consider the .RES file as just another piece of source code.
I was once also worried that adding and deleting resources (with the little Add-In) would leave holes in the .RES file (and possibly what's appended to the .EXE file). However, after some investigation, I found that that's not true. When you're in the little Add-In, you do have to hit "Save" to write-out the .RES file ... and, apparently, when that's done, apparently all items, indices, & resource item names are re-organized. It's a well done Add-In. (The only bug I've found is that it clears the clipboard when you load it, but that's true of any Add-In with a toolbar icon. It's really more of a bug in the Add-In system rather than this specific Add-In.)
As I said: I never used any add-in for handling resources. At the time I used resources I didn't know that that add-in existed.
But my question remains: how that approach can compare to just loading a new picture into a property? I think that's hard to beat.
If you need to test a new picture, how many steps do you need to do? (add-in included)
I'm asking (and being skeptical), I never used that add-in.
Re: VB6 QUESTION: Best Practice for Storing Small Images
Putting a file into resources with the add-in is a drag-and-drop operation, and then maybe assign it the name and (resource) folder you want. And that's it. To fetch while running is just as trivial, specify the folder and name to LoadResData and it loads it into a Byte array.
And that works while running in the IDE as well as compiled. When running in the IDE, it's smart enough to go to the .RES file for the resources.
Last edited by Elroy; May 5th, 2022 at 08:35 AM.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Re: VB6 QUESTION: Best Practice for Storing Small Images
Elroy, This resource add-in you are referring to, is that the usual resource editor that comes bundled with VB6 or is it something better and more advanced that you have discovered?
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: VB6 QUESTION: Best Practice for Storing Small Images
Originally Posted by Elroy
Putting a file into resources with the add-in is a drag-and-drop operation, and then maybe assign it the name and (resource) folder you want. And that's it. To fetch while running is just as trivial, specify the folder and name to LoadResData and it loads it into a Byte array.
And that works while running in the IDE as well as compiled. When running in the IDE, it's smart enough to go to the .RES file for the resources.
It seems easier than having to edit the rc file with Notepad and compile the res file, but still not as simple as loading a new picture into a property and pressing F5 to see the new picture in action in a couple of seconds.
Also, not having to keep the bmp file in disk (and rc text file too).
PS: the *.frm for all text and and *.frx for all binary seems a good design choice. I mean, not having to keep other files.
Re: VB6 QUESTION: Best Practice for Storing Small Images
depends the need and how u work.
for me all files available in a folder is more comfortable. I can add, edit, delete.
I also include all kinds of files and any format. mp3, png etc and raw data.
of course compiled I dont want the user to have thousands of files in a folder.
1: to extract takes much more time than 1 big file
2: small files eat up HD more
but if u want to have a few pictures that will be shown in the form,
why bother with resource files at all.
the only reason to have resources is to be able to call it when needed.
why should I load 1GB of files, that in raw-format will take x30 times the size, who have 30GB of GPU memory? so of course the files need to be called when needed.
but if we are talking 10MB, come on, u can just use the res.
but for me, since I have my method Im more comfortable working like this.
Re: VB6 QUESTION: Best Practice for Storing Small Images
Originally Posted by yereverluvinuncleber
Elroy, This resource add-in you are referring to, is that the usual resource editor that comes bundled with VB6 or is it something better and more advanced that you have discovered?
It's just the standard Microsoft one that comes with the VB6 development package. I've never had any problems with it.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Re: VB6 QUESTION: Best Practice for Storing Small Images
And hey, Eduardo, I'm not saying that the ImageList or the PictureBox aren't good alternatives. They are.
I suppose one advantage I see with resources is that you don't have to load a form to use it. And one disadvantage is that it's going to come to you as a Byte array that you must then deal with.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Re: VB6 QUESTION: Best Practice for Storing Small Images
The most convenient approach depends on lot of things... including personal preferences.
I usually do things with UserControls, with custom controls, so I add all the picture properties that they need.
All the alternatives have advantages and disadvantages. ImageLists have the disadvantage that they add a reference to Common Controls, an ocx. I'm just saying. Using the ImageList from Krool's controls inside the exe project avoid that dependency but add complexity to the project...
So if you just need a couple of images, why to complicate so much. Just add a couple of PictureBoxes.
But if you need 30 images, then maybe an ImageList is better. Or a resource file...
Files outside... are another option. I don't like it, but maybe another person likes that approach.
DLL? Yes, DLLs are also an option.
Store the images in the code itself, as a String constant (Base64 encoded). Also possible.
Other alternatives? For now I can't think of another one (that is not a variant of one of these)... but for sure there are more.
Re: VB6 QUESTION: Best Practice for Storing Small Images
DLLs is a good point. I've got tons of images in DLLs, especially for one particular "help" system that has lots of pictures of xrays with examples of how to interpret things and setup things. There are also lots of "help" forms in those DLLs. So yeah, that's another alternative.
If you load (and unload) the DLLs on an "as needed" basis, you can also manage memory usage.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Re: VB6 QUESTION: Best Practice for Storing Small Images
There is no single answer. Some controls require an ImageList to source images.
A PictureBox is a pig consuming multiple GDI, Win32, and ActiveX resources. If you just want to hold an image in an FRX/CTX resource then use an invisible Image control instead. Or even lighter: use an icon/cursor, bitmap, or custom resource and load it on demand or cache it in a StdPicture instance.
I mentioned PictureClip earlier but you can also do the same sort of thing with a custom Class or invisible UserControl. A "sheet" of multiple sprite/icon images can save a ton of resources compared to a large number of separate small images and container objects. This is similar to what goes on inside an ImageList control, but it can offer more flexibility such as irregular sizes.
An "image list" is a collection of same-sized images, each of which can be referred to by its zero-based index. Image lists are used to efficiently manage large sets of icons or bitmaps. All images in an image list are contained in a single, wide bitmap in screen device format. An image list may also include a monochrome bitmap that contains masks used to draw images transparently (icon style).
Re: VB6 QUESTION: Best Practice for Storing Small Images
Originally Posted by dilettante
A PictureBox is a pig consuming multiple GDI, Win32, and ActiveX resources.
I never understood that kind of POV.
If we were talking about 1000 images on a form, maybe that makes sense, but for a couple of images, you can have a couple of pigs in a barnyard.
We are not in the 90's anymore.
We need to know when to optimize and when not to optimize.
Or put in another way: when to optimize one thing (GDI, memory, etc) and when to optimize another thing (your time).
Re: VB6 QUESTION: Best Practice for Storing Small Images
Originally Posted by dilettante
How difficult is it to choose an Image control instead?
Yes, it is valid.
But I often use the PictureBoxes as a auxiliary (hidden) canvas for doing something else, so why to add another control when I can do all with just one?
BTW: I have the Image control very much out of the radar lately. It is no good for showing images (flickering in some situations), not good for stretching (no halftone).
Re: VB6 QUESTION: Best Practice for Storing Small Images
Thankyou everyone, I was expecting more consensus but at least I now have some pointers and some directions to do some research into. I am now currently working with imageLists for the moment, they are surprisingly, fairly new to me, I have only used them once as an interim structure to create dragIcons from image files on disc but wasn't aware of their power. I have in the past loaded images into structures like dictionaries or used arrays storing external references to images in the file system and I wish I'd asked earlier. The imageList looks a good fit.
I believe that the imageList will be best for my immediate needs especially as krool has his alternative version, so I can avoid using an MS-supplied OCX, something I try to avoid for my own reasons.
I also like that recommendation of a pictureClip and I see that I'll need to do some investigation there. I am familiar with RES files at a very basic level but they still seem a little alien to me. I think I'd have to be forced down that direction by someone pushing me with a broom. Storing images in external DLLs, well I have absolutely no experience to tell me how that would be done, so I may park that one for the moment unless you have a good guide or a sample program for me to ponder over.
Thanks for your help. I'll close this one and mark it as resolved. A big THANKS to you all.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: [RESOLVED] VB6 QUESTION: Best Practice for Storing Small Images
Question for you SDO and anyone else that cares to respond, the RC5 imageLists are not constrained to just one image size? ie. You can load any image size that you require? I am certain that is the case.
More importantly, can the RC5 imageList be pre-loaded with images at design time? Any examples available?
If I remember correctly in the standard VB6 imageList, all the images have to be the same dimensions and aspect ratio?
Last edited by yereverluvinuncleber; Jun 27th, 2023 at 11:07 AM.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: [RESOLVED] VB6 QUESTION: Best Practice for Storing Small Images
Originally Posted by yereverluvinuncleber
If I remember correctly in the standard VB6 imageList, all the images have to be the same dimensions and aspect ratio?
Yes
Originally Posted by yereverluvinuncleber
Question for you SDO and anyone else that cares to respond, the RC5 imageLists are not constrained to just one image size? ie. You can load any image size that you require? I am certain that is the case.
Yes. RC5/RC6 ImageList can load not only images of different sizes, but also different types of images.
Originally Posted by yereverluvinuncleber
More importantly, can the RC5 imageList be pre-loaded with images at design time? Any examples available?
Yes
RC5.ImageList is actually a cCollection, which just adds several functions specifically for image processing on top of cCollection.
You can use cCollection to make your own ImageList, for example:
Code:
Dim oMyImageList as cCollection
Set oMyImageList = New_c.Collection
oMyImageList.Add oSurface, "SurfaceName"
oMyImageList FileNameOrByteArray, "MyImageName"
Cairo.ImageList is a global, static cImageList (or a global, static collection)
Edit:
What do you mean by "design time"?
If your image assets are stored in files, or databases, or VB resource files, then you only need to load image assets from these media at runtime.
Last edited by SearchingDataOnly; Jun 27th, 2023 at 11:40 AM.
Re: [RESOLVED] VB6 QUESTION: Best Practice for Storing Small Images
Ah, right, there is the limitation I think. Thinking about adding images to embed within the binary and then the images are delivered 'internally' as per the previous suggestions above in the old chat, specifically the RES file suggestion and hidden picBoxes.
Using some of the suggestions above, I can pre-load or add images at design time within the IDE - but I imagine NOT with a RC imageList.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: [RESOLVED] VB6 QUESTION: Best Practice for Storing Small Images
I think I am just going to do what Dil suggests, load the limited JPG resources on demand, it is straightforward. I may create a multiple embedded icon and use the code that I have to load that, I'll think about it.
Sorry for re-opening a closed thread. Thankyou for your help.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: [RESOLVED] VB6 QUESTION: Best Practice for Storing Small Images
Originally Posted by yereverluvinuncleber
Ah, right, there is the limitation I think. Thinking about adding images to embed within the binary and then the images are delivered 'internally' as per the previous suggestions above in the old chat, specifically the RES file suggestion and hidden picBoxes.
Using some of the suggestions above, I can pre-load or add images at design time within the IDE - but I imagine NOT with a RC imageList.
You can easily build a UserControl based on RC5.ImageList Or RC5.Collection, which can save images at design time, just like MS.ImageList.
Re: [RESOLVED] VB6 QUESTION: Best Practice for Storing Small Images
The general way to deal with picture UI in HTML is to load a large picture PNG with many small pictures pasted in it. You only need to know the RECT attribute (XY coordinates and width, height) of each small picture, and then you can easily extract or copy it to Any object above.Just like GDIPLUS.DLL, for example, if you load a button picture (4 rounded corners + middle area), you can extract these parts and zoom in or out the button at will. GdipDrawImage or other functions can specify the area copied from the larger image.
only one picture file:ui.png,put 1000 small images
getimage like this:
put 2 files in res file:
rect.txt /or json
ui.png
Code:
dim width as long,height as long
call GetSize("01.png",width,height)
call GetSize("Closebutton",width,height)
drawimg me.hdc,img,"Closebutton"
drawimg picture1.hdc,img,"01.png"
drawimg picture2.hdc,img,"02.png"
drawimg picture3.hdc,img,"02.png",300,300
drawimg picture3.hdc,img,"02.png",100,100
Code:
dim img as long
img=loadimg(ui.png) or by res memory stream
function drawimg(dc,img,imgname)
'****
end function
function GetSize(imgname,width as long,height as long)
***
end function
Last edited by xiaoyao; Jun 27th, 2023 at 07:00 PM.
Re: [RESOLVED] VB6 QUESTION: Best Practice for Storing Small Images
For example, how to combine multiple pictures into one large picture, the best combination, the least width and height occupation. and return a JSON or text configuration like:
x,y,width,height
1.png 100,100,50,50
2. jpg 100,150,30,100
A similar technique is used for a whole iron plate, how to cut multiple objects of different sizes with the least waste
Last edited by xiaoyao; Jun 27th, 2023 at 06:47 PM.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: [RESOLVED] VB6 QUESTION: Best Practice for Storing Small Images
Recently, I need to use a lot of fragmentary images of labels and buttons in the project, and I haven't had a chance to use the "wizard technology" in Css. Here I write a document about my understanding of background-position for more people to learn.
Re: [RESOLVED] VB6 QUESTION: Best Practice for Storing Small Images
Nothing really new there.
VB6 came with ImageLists that work similarly internally. The limitations there are that all images are the same size and they're stored as a composite uncompressed BMP.
For more complex user-composited images VB6 came with PictureClip which can carve out uniform-sized "cells" or arbitrary rectangles. That way you can have "tiles" of varying dimensions. At design time you can load it with a BMP, GIF, or JPEG but they'll likely be stored as BMP. However you can load a PNG or something at runtime and assign it to PictureClip.Picture, perhaps from a PNG resource.
You can also create an invisible-at-runtime UserControl to handle this however you like.
But the principle has been around for quite a long time.