Create Timer Example To Show Image Presentation in Oracle Forms
2016-12-25 18:11
666 查看
[align=justify]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:[/align] [align=justify][/align]
[align=justify](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.[/align] [align=justify](4) Then create when-new-form-instance trigger at form level and place the following code:[/align] [align=justify] [/align] [align=left] Declare[/align] [align=justify]tm timer;[/align] [align=justify]begin[/align] [align=justify] ---- 3000 milliseconds = 3 seconds[/align] [align=justify] create_timer('foxtimer', 3000, repeat);[/align] [align=justify]end;[/align]
(5) Then create when-timer-expired trigger in form level and place the following code:
[align=left]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;[/align]
[align=justify](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.[/align] [align=justify](4) Then create when-new-form-instance trigger at form level and place the following code:[/align] [align=justify] [/align] [align=left] Declare[/align] [align=justify]tm timer;[/align] [align=justify]begin[/align] [align=justify] ---- 3000 milliseconds = 3 seconds[/align] [align=justify] create_timer('foxtimer', 3000, repeat);[/align] [align=justify]end;[/align]
(5) Then create when-timer-expired trigger in form level and place the following code:
[align=left]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;[/align]
See also: Create timer to display clock in Oracle Forms
[align=left]http://www.foxinfotech.in/2014/02/creating-stopping-restarting-deleting-timer-oracleforms.html[/align]相关文章推荐
- Create Hierarchical Tree To Control Records In Oracle Forms
- XAF How to show custom forms and controls in XAF (Example)
- An Example of Pre-Query and Post-Query Triggers in Oracle Forms With Using Display_Item to Highlight Dynamically
- If Value Exists Then Query Else Allow Create New in Oracle Forms An Example
- Create Hierarchical Tree To Control Records In Oracle Forms
- Create Stacked Canvas to Scroll Horizontal Tabular Data Blocks In Oracle Forms
- Create Stacked Canvas to Scroll Horizontal Tabular Data Blocks In Oracle Forms
- Learn How To Create Trigger In Oracle Forms
- How to Create and Evaluate XPath Expression in Java - Tutorial and Example
- according to datakey in th grid to show the image or not
- Fatal error: Call to undefined function imagecreatetruecolor() in
- How to create a task in the openwrt system, the timer to switch WiFi power。
- sharepoint admin svc must be running in order to create deployment timer job 若要创建计时器作业,必须运行SVC
- Oracle 10g 异常:ORA-01658:unable to create INITIAL extent for segmnet in tablespace SYSTEM
- How To Commit Just One Data Block Changes In Oracle Forms
- Using Find_Alert and Show_Alert in Oracle Forms
- Oracle Rac root.sh报错 Failed to create keys in the OLR, rc = 127 libcap.so.1
- [置顶] How to create Oracle 11g R2 database manually in ASM?
- 苹果官方解释可以忽略『CGBitmapContextCreateImage: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE...』报错的帖子
- php报错-Call to undefined function imagecreatetruecolor() in