Open Tiff Images [message #503548] |
Mon, 18 April 2011 00:23 |
garimella_aditya
Messages: 8 Registered: May 2007 Location: India
|
Junior Member |
|
|
Hi All,
I have a folder "c:\Images\" which has arround 5 image files they all are Tiff Images. now from forms i want to open this images one by one.
example:
file 1: SIGN.TIFF
file 2: FORM.TIFF
file 3: FORM_1.TIFF
File 4: FORM_2.TIFF
File 5: PHOTO.TIFF
I have the form and in that I have only one Image Item and two buttons with name "Previous" & "Next"
Action to be Done:
-> Initially when i start form SIGN.TIFF has to open.
-> when i press next FORM.TIFF has to be replaced with SIGN.TIFF
so on...
Note: There is a chance of keeping 10 more files.
How can this be achieved in forms.
|
|
|
Re: Open Tiff Images [message #510465 is a reply to message #503548] |
Mon, 06 June 2011 02:55 |
|
Hello!
You can do this by changing the code like this:
For the first image write code on the WHEN-NEW-FORM-INSTANCE :
READ_IMAGE_FILE('\\C:\IMAGES\'||'SIGN.TIFF', 'TIFF',
'BLOCK_NAME.PICTURE');
and then on the next button write:
DECLARE V_NUMBER NUMBER := 1; V_COUNT NUMBER := 5;
BEGIN
FOR R1 IN 1..V_COUNT LOOP
IF V_NUMBER = 1 THEN
READ_IMAGE_FILE('\\C:\IMAGES\'||'FORM.TIFF', 'TIFF',
'BLOCK_NAME.PICTURE');
ELSIF V_NUMBER = 2 THEN
READ_IMAGE_FILE('\\C:\IMAGES\'||'FORM_1.TIFF', 'TIFF',
'BLOCK_NAME.PICTURE');
ELSIF V_NUMBER = 3 THEN
READ_IMAGE_FILE('\\C:\IMAGES\'||'FORM_2.TIFF', 'TIFF',
'BLOCK_NAME.PICTURE');
ELSIF V_NUMBER = 4 THEN
READ_IMAGE_FILE('\\C:\IMAGES\'||'PHOTO.TIFF', 'TIFF',
'BLOCK_NAME.PICTURE');
END IF;
V_NUMBER := V_NUMBER + 1;
END LOOP;
END;
So you can add as many images as you need and these will be shown one by one.
Thanks!
Saira
|
|
|
|