The approach that Fred suggested does not work for a modal form.
The code below does work but during the delay your program will be suspended.
(command "_.OPENDCL")
(dcl_Project_Load "DelayedErase" 'T)
(defun delete_curent_picture ( / )
(princ "\nNow we wait... ")
; (sleep 5000) ; Bricscad has the built-in (sleep) function.
(command "_.delay" 5000)
(dcl_PictureBox_Clear DelayedErase_Form1_PictureBox1)
)
(defun c:DelayedErase_Form1_TextButton1_OnClicked (/)
(delete_curent_picture)
; (dcl_DelayedInvoke 5000 "delete_curent_picture") ; Does not work for a modal form.
)
(defun c:DelayedErase ()
(dcl_Form_Show DelayedErase_Form1)
)
An alternative could be to use an animated gif image. But note:
author=owenwengerd link=topic=1288.msg6905#msg6905 date=1275579476 wrote:
You should be able to use the HTML control to display a gif, but there is no .gif support in native OpenDCL code (because .gif support requires a license from CompuServe).
BTW: Your call to (dcl_DelayedInvoke) did indeed have wrong arguments.