Page 1 of 1

Display Image to CRT screen

Posted: Fri Feb 17, 2017 8:40 am
by alepap
How do you display an image JPG or BMP in a CRT screen?

Re: Display Image to CRT screen

Posted: Fri Feb 17, 2017 9:04 am
by rdonnay

Code: Select all

#INCLUDE "dcdialog.CH"

FUNCTION Main()

LOCAL GetList[0], oBitmap, oCrtWindow := SetAppWindow()

@ 0,0 DCSTATIC TYPE XBPSTATIC_TYPE_BITMAP ;
      CAPTION '\exp20\bitmaps\wizard.bmp' ;
      SIZE 600,400 PIXEL

DCREAD GUI EXIT PARENT oCrtWindow

@ 23,0 SAY 'Here is some text'

wait

RETURN nil

Re: Display Image to CRT screen

Posted: Fri Feb 17, 2017 3:57 pm
by alepap
Wow Roger, this amazing. Thank you.

Cho cho !

Re: Display Image to CRT screen

Posted: Fri Feb 17, 2017 4:05 pm
by alepap
Once you have a bitmap on the screen how do you remove the bitmap to go back to the CRT Window without the bitmap?

Re: Display Image to CRT screen

Posted: Fri Feb 17, 2017 4:28 pm
by rdonnay
Store the DCSTATIC object to a variable name:

@ .. DCSTATIC .. OBJECT oBitmapStatic


You can then manipulate it with:

oBitmapStatic:hide()
oBitmapStatic:show()

Re: Display Image to CRT screen

Posted: Fri Feb 17, 2017 6:08 pm
by alepap
Wonderful. Works as a charm.

Choo choo !