OpenDCL Forums

OpenDCL => Show and Tell => Topic started by: Kerry on July 27, 2007, 11:31:14 PM

Title: Basic Splash Screen
Post by: Kerry on July 27, 2007, 11:31:14 PM
In response to a user Request ..
The ODCL is too large to be attached due to the current site configuration .. sorry, but it's pretty simple :-)
(the ODCL is 548 KB ; most of which is the graphic picture)

(DEFUN c:TestSplash (/ _Delay_Initialize)
    (VL-LOAD-COM)
    ;;------------------------------------------------------
    (defun _Delay_Initialize (delayval / cnt)
        (setq cnt 0)
        (setvar "cmdecho" 0)
        (while (< cnt delayval)
            (command "delay" "20")
            (dcl_Control_SetValue TestSplash_F1_ProgressBar1 (setq cnt (1+ cnt)))
        )
        (dcl_Form_close TestSplash_F1)
       
        ;; pretend to do stuff
        (command "delay" "700")
        ;;
        (dcl_Form_close TestSplash_Splash)       
    )
    ;;------------------------------------------------------
    (DCL_PROJECT_LOAD "TestSplash.odcl" T)
    ;;
    (DCL_FORM_SHOW TestSplash_Splash)
    (dcl_Form_Show TestSplash_F1 100 100)
    (_Delay_Initialize 100)
    ;;
    (DCL_FORM_SHOW TestSplash_Main)
    (PRINC)
)


[attachment deleted by admin]
Title: Re: Basic Splash Screen
Post by: Kerry on July 27, 2007, 11:50:50 PM
Perhaps a suitable way to treat this would be to load a seperate LSP and ODCL just for the Splash screen ... then remove BOTH from memory to save resources ... but that may just be the frugal side of my nature talking :-)
Title: Re: Basic Splash Screen
Post by: Kerry on July 27, 2007, 11:56:27 PM
Here's the code with the Pictures removed ...
Note that the file name is different ..

... so just rename the file to "TestSplash.odcl" and add some piccys to suit  ;)

[attachment deleted by admin]
Title: Re: Basic Splash Screen
Post by: dkh007 on July 28, 2007, 06:21:15 AM
Nice trick. I prefer this over a built in Splash Screen (unless we would be able to change the picture in OpenDCL with a built in).
Title: Re: Basic Splash Screen
Post by: jb on July 28, 2007, 07:06:33 AM
Thanks Kerry . . .
Title: Re: Basic Splash Screen
Post by: Kerry on July 28, 2007, 05:44:58 PM

It may be more advantagous to use a HTML page and read the piccy from a local file.

(if (= Today Sunday)  (dcl_Html_Navigate Splash_F_HtmlControl1  "P:\Destination-01") )
Title: Re: Basic Splash Screen
Post by: BazzaCAD on February 26, 2008, 12:00:58 PM
In the latest Alpha build (5.0.0.6) there's a new sample showing how to create a basic Splash Screen with the new (dcl_DelayedInvoke) function.
This doesn't lock up Acad like (command "delay" ###) so you can continue to load other LSP's in the background or preform other processes.

[attachment deleted by admin]