Hello,
I am using an OK button to go from one dialog A to dialog B. Dialog B uses the following commands to load a .bmp and .jpg files to the screen. Most of the times there is no problem, but every now and then dialog B fails to load the .bmp file (it always happen to .bmp not .jpg). The file sizes are about 24K and the bmp is (256 color bmp). Anyone any idea why this might happen. Thank you in advance.
Frank
Thank you. I tried to use what you suggested : setImageFile : (string FileName). but unfortunately I get an error "undeclared identifier". Probably I am not using the full nomenclature.
Thanks Harrison,
I added the imageControl pack and it shows up under the project pfc directory. But somehow the program does not recognize "setImageFile (FileName)". Instead of that I am using pict := vpi::pictLoad("yyy.bmp"), which works fine but every now and then it becomes unstable and does not load the file, but on the second try it continues to work fine. Strange!
Best,
Frank
Open dialog constructor.
In window "Controls" click key symbol.
Click in the dialog area.
In appeared list choose "imageControl".
O'k button.
"imageControl_ctl" will appear - rename as you want, replace as you want, resize as you want.........
(all needed packages added automatically)
Add "onShow" event of dialog " imageControl_ctl.setImageFile(FileName)".
Be happy)))
I have some old version of VIP - may be today it can be done simplier
Thanks again to wonderful contributing experts of the forum.
I just wanted to add a feedback on the outcome of loading the files by the two different methods. using setImageFile : (string FileName) as suggested by Gukalov was easier and more straightforward than using complicated pict := vpi::pictLoad("FileName"). It resolved the instability problem that I indicated earlier. However it seems when the same file (occupying the same rectangular size on the dialog) when it was loaded by vpi::picLoad(FileName) appears sharper than the other method. The difference is more apparent when the image contains some text. I tried several times to make sure it was not just imagination.