Basic Splash Screen

Started by Kerry, July 27, 2007, 11:31:14 PM

Previous topic - Next topic

Kerry

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]
Perfection is not optional.
My other home is TheSwamp

Kerry

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 :-)
Perfection is not optional.
My other home is TheSwamp

Kerry

#2
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]
Perfection is not optional.
My other home is TheSwamp

dkh007

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).
Daniel Hargreaves, AIA, CSI, CDT, RAS
accustudio.com

jb

James Buzbee
Managing Memeber
Black Horse Development, LLC

Kerry


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") )
Perfection is not optional.
My other home is TheSwamp

BazzaCAD

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]
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom