Form1;bmp;str
⎕CS #.GDI
⍝ RUN ONLY ONCE!
⍝ Grab the bits from bitmap, store in #._GDI.splashBits
⍝ ---
⍝ bmp←#.Bitmap.New⊂'c:\stormwind\splash.bmp'
⍝ str←⎕NEW #.IO.MemoryStream
⍝ bmp.Save str #.Drawing.Imaging.ImageFormat.Jpeg
⍝ #._GDI.splashBits←str.ToArray
⍝ str.Dispose
⍝ bmp.Dispose
⍝ ⎕EX¨'str' 'bmp'
⍝ ---
⍝ Persistent: B1, F1, L1, S1
S1←⎕NEW #.IO.MemoryStream
S1.Write(⊂#._GDI.splashBits),0,⍴#._GDI.splashBits
B1←#.Bitmap.New S1
F1←#.Form.New ⍬
F1.(Width Height StartPosition FormBorderStyle MaximizeBox MinimizeBox ControlBox)←500 286 #.FormStartPosition.CenterScreen #.FormBorderStyle.FixedToolWindow 0 0 0
F1.BackgroundImage←B1
L1←#.Label.New ⍬
L1.(Location Width TextAlign BackColor)←(#.Point.New 30 70)460 L1.TextAlign.MiddleLeft #.Color.Transparent
F1.Controls.Add L1
F1.Visible←1
⎕DL 0.01
Dispose when the splash screen has done it job:
GDI.(F1 L1 S1 B1).Dispose ⋄ GDI.(⎕EX¨'F1' 'L1' 'S1' 'B1')
Note: Must be in this order, F1 L1 S1 B1. If opposite order, WIndows displays a red cross on the image before deleting the form.