Yet the GUI gives me 2 possibilities.
1/2 LoadPicture(Resource as String) as Image
or
2/2 LoadPicture (Resource as IResource) as Image
Clearly the variable FN in my code above is a String, which the GUI says is acceptable.
It is also a valid file address, as it was just retrieved from the commondialog control.
I also tried the New Resources trick ... It complained as well until I placed a Set command before the Picture1.Picture command. That quieted the compiler .... but though it didn't complain, it didn't load the picture either....
scGuy:
I think perhaps you fingered the problem .. the .picture property will not accept an Image type .. but demands a resource.
If this is wrong I am asking someone to correct this notion.
I would be interested if someone can come up with code that will do the same thing I have just attempted that will work.
One thing that I will be trying to do eventually is stretch the picture to fit the entire picture control area.
For that I will need the PaintPicture method which does appear to work. It will allow stretching providing that I can plug in the proper variables. However I will need the actual size of the original picture so that I can stretch it to it's final size. This I usually do in VB6 by loading the picture into another picture control, and since that will size itself, I then copy it over into the working picture control with the paintpicture method. Maybe there is another method of determining the actual size of the picture file.
In this excersize it is critical that the file can be selected dynamically from the commondialog.