
mostrar bmp
Publicado por antonio (36 intervenciones) el 22/10/2015 13:49:46
Hola tengo un programa en xbase y necesito mostrar un fichero bmp en pantalla, como se hace?
gracias anticipadas
gracias anticipadas
Valora esta pregunta


0




PROCEDURE Main()
LOCAL oBmp, nWidth, nHeight
// Crea un objeto XbpBitmap y carga el archivo BMPoBmp := XbpBitmap():new()
oBmp:createFromFile("ruta/archivo.bmp")
// Obtiene las dimensiones del BMP cargadonWidth := oBmp:width()
nHeight := oBmp:height()
// Crea una ventana para mostrar el BMPCREATE WINDOW WinWidth, WinHeight TITLE "Imagen BMP"
ACTIVATE WINDOW WinWidth
SET WINDOW WinWidth SIZE nWidth, nHeight // Dibuja el BMP en la ventanaDRAW OBJECT oBmp TO WinWidth
READ // Espera hasta que el usuario cierre la ventana // Limpia la ventana y libera los recursosSET WINDOW WinWidth OFF
RELEASE oBmp
RETURN



