Create Timer Example To Show Image Presentation in Oracle Forms

Suppose you want to change multiple images after a specified time in home screen of your oracle forms application. Follow these simple steps to create image presentation with create_timer:

(1) Place an image item on canvas and set the appropriate size and other properties for image item.
(2) Create a parameter in object navigator with any name and the data type of the parameter should be number type and specify the default value 1.
(3) You must have multiple images with name like image1.jpg, image2.jpg, image3.jpg and so on.
(4) Then create when-new-form-instance trigger at form level and place the following code:
 
Declare
tm timer;
begin
   ---- 3000 milliseconds = 3 seconds
   create_timer('foxtimer', 3000, repeat);
end;

(5) Then create when-timer-expired trigger in form level and place the following code:

begin
-- this will change the images in image item in every 3 seconds 
  read_image_file('C:\Documents and Settings\yourpc\My Documents\My Pictures\image'||
  :parameter.nprm||'.jpg', 'JPEG', 'block3.IMAGE7');
  :parameter.nprm := :parameter.nprm + 1;
if :parameter.nprm > 10 then
   :parameter.nprm := 1;
end if;
end;

See also: Create timer to display clock in Oracle Forms

430670022_233.jpg

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值