I made a simply function to showa bitmap on a wnd and move it
Function crea_oggetto(nItem, nRow,nCol)
Local oSprite
Local cBitmap:=""
DO CASE
CASE nItem = 1
cBitmap=".\bar\BAR1.bmp"
..
endcase
@ nRow, nCol BITMAP oSprite;
FILENAME cBitmap;
PIXEL NOBORDER of oWnd
oSprite:lTransparent = .T.
oSprite:Move(oSprite:nTop,;
oSprite:nLeft,;
oSprite:nWidth(),;
oSprite:nHeight())
oSprite:lDrag := .T.
oSprite:bMoved := {|| oSprite:CoorsUpdate() ,;
nBmpRow := oSprite:nTop ,;
nBmpCol := oSprite:nLeft ;
}
oSprite:bAction := {|oSprite| Menu_azioni(oSprite) }
return nil
FUNC Menu_azioni(oSprite)
local oMenu
MENU oMenu POPUP 2007
MENUITEM
ENDMENU
ACTIVATE POPUP oMenu OF oDlg AT nRow, nCol
RETURN( NIL )
return nil
why it make error on baction ?