TOPIC: How to make a Splash Dialog
#323
How to make a Splash Dialog 4 Years ago
The following snippet will open a chromeless dialog (without borders) and show a .gif file filling the dialog area, the dialog will close in 3 seconds

Code:


Dialog(0
 Controller
  {
    Controls:
     (
Image 'Paula.gif'
      )
      New(){
SetTimer(.Parent.Hwnd,1,3000,
{|a b c d|
 KillTimer(.Parent.Hwnd, 1)
 .Window.Result(false)
}
      )
   }
 }
 style:0x80880040
)



The secret to eliminate the borders is style:0x80880040
To find the hexa number i've used PellesC resource editor, created the dialog and looked at the .res file
This example uses a Windows Api Function (Set Timer) using a CodeBlock as callback function.
The code compiles and executes OK but the IDE shows a red bar saying Syntax Error... Can anybody point me the error?
 
 
#829
Re:How to make a Splash Dialog 3 Years, 5 Months ago
A better Splashscreen function...

Code:


Splash

function()
{
f = function()
{
Dialog(0
 Controller
  {
Controls:
 (
Image 'splash.gif'
  )
  New(){
SetTimer(.Parent.Hwnd,1,3000,
{|a b c d|
 KillTimer(.Parent.Hwnd, 1)
 .Window.Result(false)
}
  )
   }
 }
 style:0x80880040
)
}
Thread(f)
}



and in your Main startup function just call Splash()