nRow, nColRow and column where the component is placed. With PIXEL, coordinates start at the upper-left corner of the parent.
AdvPL Guide@ <nRow>, <nCol> BITMAP [<oBmp>] [RESOURCE <cResName> | FILE <cFileName>] [SIZE <nWidth>, <nHeight>] [OF <oWnd>] [PIXEL]Displays an image in an AdvPL interface from a repository resource or a disk file.
The @ ... BITMAP command creates a visual component for displaying images in dialogs, panels and other containers. During compilation it is translated into the TBitmap class New() constructor. The image may come from a resource stored in the object repository or from a file resolved from the environment RootPath.
@ <nRow>, <nCol> BITMAP [<oBmp>] [RESOURCE <cResName> | FILE <cFileName>] [SIZE <nWidth>, <nHeight>] [OF <oWnd>] [PIXEL]nRow, nColRow and column where the component is placed. With PIXEL, coordinates start at the upper-left corner of the parent.
oBmpVariable that receives the TBitmap object, required when properties or methods will be used after creation.
RESOURCE cResNameName of an image stored as a resource in the object repository. NAME and RESNAME are also accepted.
FILE cFileNameDisk filename resolved from the environment RootPath. FILENAME and DISK are also accepted.
SIZE nWidth, nHeightWidth and height reserved for the component.
OF oWndDialog, panel, folder or other visual container that owns the bitmap. OF is the form recommended by the official documentation.
ON CLICK / ON RIGHT CLICKLiteral function executed on a left or right click. The documented syntax does not accept a CodeBlock here.
NOBORDER · SCROLL · ADJUST · CURSOR · PIXEL · WHEN · VALIDControl border, scroll bars, image fitting, cursor, coordinates, enablement and component validation.
#Include "TOTVS.ch"
User Function ExBitmap()
Local oDlg
Local oBmp
Local cFile := "\system\image.png"
Define Dialog oDlg Title "Image example" ;
From 180, 180 To 550, 700 Pixel
@ 10, 10 Bitmap oBmp File (cFile) ;
Size 120, 80 Of oDlg Pixel NOBORDER
Activate Dialog oDlg Centered
ReturnThe file is read from RootPath, displayed without a border, and the object remains available in oBmp.
#Include "TOTVS.ch"
User Function ExBitmapRecurso()
Local oDlg
Local oBmp
Define Dialog oDlg Title "Atalho visual" ;
From 0, 0 To 180, 360 Pixel
@ 15, 20 Bitmap oBmp Resource "LOGO_EMPRESA" ;
Size 120, 60 Of oDlg Pixel Adjust ;
On Click AbrirCadastro()
Activate Dialog oDlg Centered
Return
Static Function AbrirCadastro()
MsgInfo("Imagem selecionada")
ReturnThe resource is fitted to the defined area and calls a literal function when left-clicked.
© 2026 Usina.BR. Todos os direitos reservados. TOTVS, Protheus, Microsiga e seus respectivos logotipos são marcas de titularidade da TOTVS S.A. AdvPL é uma linguagem de programação desenvolvida pela TOTVS. O AdvPL Guia é um projeto independente, sem vínculo, representação, patrocínio ou afiliação com a TOTVS S.A., suas franquias ou representantes.