Вот одна из самых примитивных реализаций:
Код
#Include "fbgfx.bi"
#If __FB_LANG__ = "fb"
Using fb
#EndIf
Screen 14,32,2
ScreenSet 1
SetMouse ,,,1
Dim Shared image As Any Ptr
Dim Shared As Integer w = 300,h = 300
image = ImageCreate( w, h, RGB(0, 128, 0) )
Dim Shared As Integer xImg = 120, yImg = 60, iFlag
If image = 0 Then
Print "Failed to create image."
Sleep
End -1
End If
Put (xImg, yImg), image, PSet
Function MouseIn() As Integer
Dim e As event
If (ScreenEvent(@e)) Then
Select Case e.type
Case EVENT_MOUSE_MOVE
If iFlag = 1 Then
If e.x > xImg AndAlso e.x < (xImg+w) Then
If e.y > yImg AndAlso e.y < (yImg + h) Then
xImg+=e.dx
yImg+=e.dy
EndIf
EndIf
EndIf
Case EVENT_MOUSE_BUTTON_PRESS
If (e.button = BUTTON_LEFT) Then
iFlag = 1
End If
Case EVENT_MOUSE_BUTTON_RELEASE
iFlag = 0
End Select
EndIf
Cls
Put (xImg, yImg), image, PSet
PCopy
End Function
Do
MouseIn()
Sleep 1
Loop Until MultiKey(1) 'ESC для выхода