I am having a problem using TPicture. Strangely, recently I wrote a program in Delphi7 that uses TPictures, and it works fine. I must have forgotten a critical step and don't see it in my other program, Here is the simplest example;
Start a new MDI project.
Put a TPicture, small, about 2 inches wide, and a button on the form.
Add "JPEG" to USES
Toggle stretch to true for the TImage
Make an On-Click event for the button
Write this line:
In this case this is a valid path to an existing .jpg file, about 600K. I have also tried this with a small .bmp.
I run the program and click on the button. No picture. I can't even see the empty picture. I tried it last night on Delphi7/W2K. I usually am using Delphi 2010 on a W7 machine. There is no picture on either computer. I tried adding a few lines after the load from picture such as Image1.Refresh, redraw. Nothing.
For the final part of the experiment I select the file for the design time picture property. It displays on the form, and at run time. When I click the button noting happens. The design time image still displays.
I must be forgetting some simple step. What is it ?