Display Image to CRT screen

If you are converting a text-based Clipper application, a FoxPro application or just writing an application from scratch, use this forum for your eXpress++ questions.
Post Reply
Message
Author
User avatar
alepap
Posts: 94
Joined: Tue Jul 28, 2015 5:15 am

Display Image to CRT screen

#1 Post by alepap »

How do you display an image JPG or BMP in a CRT screen?

User avatar
rdonnay
Site Admin
Posts: 4774
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Display Image to CRT screen

#2 Post 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
The eXpress train is coming - and it has more cars.

User avatar
alepap
Posts: 94
Joined: Tue Jul 28, 2015 5:15 am

Re: Display Image to CRT screen

#3 Post by alepap »

Wow Roger, this amazing. Thank you.

Cho cho !

User avatar
alepap
Posts: 94
Joined: Tue Jul 28, 2015 5:15 am

Re: Display Image to CRT screen

#4 Post 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?

User avatar
rdonnay
Site Admin
Posts: 4774
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Display Image to CRT screen

#5 Post by rdonnay »

Store the DCSTATIC object to a variable name:

@ .. DCSTATIC .. OBJECT oBitmapStatic


You can then manipulate it with:

oBitmapStatic:hide()
oBitmapStatic:show()
The eXpress train is coming - and it has more cars.

User avatar
alepap
Posts: 94
Joined: Tue Jul 28, 2015 5:15 am

Re: Display Image to CRT screen

#6 Post by alepap »

Wonderful. Works as a charm.

Choo choo !

Post Reply