RE: Splash : Derek Parnell

new topic     » topic index » view thread      » older message » newer message

It works for me.  I ran it in a directory without splash.bmp and got a 
blank rectangle.  Then I tossed a splash.bmp into the same directory.  
It showed in the window.  So I guess, check to make sure your bitmap is 
where you think it is.
Evan Marshall wrote:
> I have here a slightly modified bit of code that I found on the forum.
> When I run it, all that I get is a grey rectangle.  What am I doing
> wrong?
> ---------------------------------------------
> include win32lib.ew
> 
> constant MainWindow = create(Window, "MainWindow", 0, 0, -100, 0, 0,
> 0),
> Splash = create(Window, "Splash", 0, 0, 0, 0,
> 0,{WS_POPUP,WS_VISIBLE}),
> SBM = create(Bitmap, "", Splash, 0, 0, 800, 600, 0)
> 
> procedure initialize()
> 
> atom timeout
> 
> -- Set 5 seconds as the minimum time for a splash window display.
>     timeout = time() + 5
> -- Draw the stuff on the splash screen.
>     setBitmap(SBM, "splash.bmp")
> -- Move it back into view
>     setRect(Splash, 100, 100, 800, 600, 1)
> -- Wait til countdown has elapsed.
>     while timeout > time() do
>         doEvents(0)
>     end while
> -- Get rid of splash screen.
>     destroy(Splash)
> 
> 
> end procedure
> 
> onActivate[MainWindow] = routine_id("initialize")
> 
> WinMain( MainWindow, Normal )
> 
>

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu