$IFNDEF TRUE
$DEFINE True 1
$ENDIF
$IFNDEF FALSE
$DEFINE False 0
$ENDIF
$IFNDEF boolean
$DEFINE boolean INTEGER
$ENDIF
TYPE QSplash EXTENDS QOBJECT
PRIVATE:
form AS QFORM
label1 AS QLABEL
PUBLIC:
Image AS QIMAGE
Text AS STRING
TextCenter AS boolean
TextTop AS SHORT
TextLeft AS SHORT
TextFont AS QFONT
TextTransparent AS boolean
SUB Show(Time AS SHORT)
WITH QSplash
IF .text<>"" THEN
.label1.Transparent=false
.label1.autosize=true
.label1.font=.TextFont
.label1.CAPTION=.text
.label1.PARENT=.form
IF .textCenter THEN
.label1.left=(.form.ClientWidth-.label1.Width)/2
ELSE
.label1.left=.textLeft
END IF
IF .TextTransparent THEN
.form.ClientHeight=.Image.Height
.label1.top=.TextTop
.label1.Transparent=true
ELSE
.label1.top=.Image.Height+10
.form.ClientHeight=.label1.top+.label1.height+10
END IF
ELSE
.form.ClientHeight=.Image.Height
END IF
.form.ClientWidth=.Image.Width
.form.HideTitleBar
.form.Show
.form.Repaint
SLEEP Time
.form.CLOSE
END WITH
END SUB
CONSTRUCTOR
form.BorderStyle=3
form.Center
Image.PARENT=QSplash.form
Image.autosize=true
Image.left=0
Image.top=0
Text=""
TextLeft=5
TextCenter=False
END CONSTRUCTOR
END TYPE
|