User Tools

Site Tools


prop_clipbits.htm
Navigation:  Language Reference > App C - PROP: Runtime Properties > Complete Property List >====== PROP:ClipBits ====== Previous pageReturn to chapter overviewNext page

Property of an IMAGE control that allows bitmap images to be moved into (but not out of) the Windows clipboard when set to one (1). Only .BMP, .PCX, or .GIF image types can be stored as a bitmap (.BMP) image in the Clipboard.

Example:

WinView WINDOW('View'),AT(0,0,320,200),MDI,MAX,HVSCROLL

        IMAGE(),AT(0,0,,),USE(?Image)

        BUTTON('Save Picture'),AT(80,180,60,20),USE(?SavePic)

        BUTTON('New Picture'),AT(160,180,60,20),USE(?NewPic)

       END

FileName  STRING(64)                  !Filename variable

CODE

OPEN(WinView)

DISABLE(?LastPic)

IF NOT FILEDIALOG('Choose File to View',FileName,'BitMap|*.BMP|PCX|*.PCX',0)

 RETURN                              !Return if no file chosen

END

?Image{PROP:Text} = FileName

ACCEPT

 CASE ACCEPTED()

 OF ?NewPic

  IF NOT FILEDIALOG('Choose File to View',FileName,'BitMap|*.BMP|PCX|*.PCX',0)

   BREAK                             !Return if no file chosen

  END

  ?Image{PROP:Text} = FileName

 OF ?SavePic

  ?Image{PROP:ClipBits} = 1          !Put image into Clipboard

  ENABLE(?LastPic)                   ! activate Last Picture button

 END

END

prop_clipbits.htm.txt · Last modified: 2021/04/15 15:57 (external edit)