$IFNDEF TRUE
$DEFINE True 1
$ENDIF
$IFNDEF FALSE
$DEFINE False 0
$ENDIF
DECLARE FUNCTION SkinReleaseCapture LIB "user32" ALIAS "ReleaseCapture" () AS LONG
DECLARE FUNCTION SkinSetLong LIB "User32" ALIAS "SetWindowLongA" (hwnd AS LONG,nIndex AS LONG,dwNewLong AS LONG) AS LONG
CONST SKIN_SYSCOMMAND=&h112
CONST SKIN_MOVE=&hF012
CONST SKIN_HWNDPARENT=-8
CONST SKIN_HWNDDESKTOP=0
TYPE QSkin EXTENDS QFORM
Skin AS QIMAGE
OffsWidth AS SHORT
OffsHeight AS SHORT
EVENT OnResize
QSkin.Width=QSkin.Skin.Width+QSkin.OffsWidth
QSkin.Height=QSkin.Skin.Height+QSkin.OffsHeight
QSkin.hidetitlebar
END EVENT
EVENT Skin.onmousedown(Button AS SHORT,X AS SHORT,Y AS SHORT,Shift AS SHORT)
SkinReleaseCapture
SendMessage(QSkin.handle,SKIN_SYSCOMMAND,SKIN_MOVE,0)
END EVENT
SUB SetDeskBar
SkinSetLong(QSkin.handle,SKIN_HWNDPARENT,SKIN_HWNDDESKTOP)
SkinSetLong(application.handle,SKIN_HWNDPARENT,QSkin.handle)
END SUB
SUB Resize
QSkin.Width=QSkin.Skin.Width+QSkin.OffsWidth
QSkin.Height=QSkin.Skin.Height+QSkin.OffsHeight
QSkin.hidetitlebar
END SUB
CONSTRUCTOR
borderStyle=1
DelBorderIcons 2
Skin.PARENT=QSkin
Skin.autosize=true
Skin.left=0
Skin.top=0
OffsWidth=0
OffsHeight=0
END CONSTRUCTOR
END TYPE
|