Skip to main content

I am trying to use the PictureBox in Accuterm to  display an image of a stock item.

\\\\\\\\i can get an image displayed as created at the development of the Form but  can not find out how to change it per stock item.

It is probably very simple but I cant see how ?

Can anybody help please ?

Chris Baxter 



------------------------------
Chris Baxter
CB Soft
IPSWICH GB
------------------------------

I am trying to use the PictureBox in Accuterm to  display an image of a stock item.

\\\\\\\\i can get an image displayed as created at the development of the Form but  can not find out how to change it per stock item.

It is probably very simple but I cant see how ?

Can anybody help please ?

Chris Baxter 



------------------------------
Chris Baxter
CB Soft
IPSWICH GB
------------------------------

We are still using AccuTerm 7

      *ESC STX iL , filename , col , row , width , height , aspect, border CR
      *Displays the image file filename at column col and row row. Height and width are optional; if
      *specified (and not zero), the image is scaled to height rows and width columns. Otherwise,
      *the original image size is used. If aspect is non-zero, the image aspect ratio is preserved
      *(the specified width or height is reduced to preserve the aspect ration). Border is N for no
      *border, B for simple border, R for raised border or I for inset border style. Image file types
      *supported include BMP, JPEG, GIF, PCD, PCX, PICT, PNG, PSD, TARGA, TIFF, WBMP,
      *XBM, XPM and Windows Metafile. Images are considered "protected" data; a "clear unprotected
      *characters" command will not clear images from the terminal screen.
      *The image file does not need to be a local file; if an internet connection is available the
      *filename can specify a URL instead of a local or network file.
      *Note: AccuTerm 7 uses the FreeImage Open Source image library.
      EQUATE ESC TO CHAR(27)
      EQUATE STX TO CHAR(2)
      EQU CR TO CHAR(13)
      PIXDIR = '\\\\iomega-01d006\\aix\\pictures\\drivers\\'
      PIXPATH=PIXDIR:CDD.ID:'.JPG'
      PRINT ESC:STX:'iL,':PIXPATH:',65,3,20,6,1,B':CR:

This is what we do to display our Drivers.



------------------------------
Jon Card
VP
Combined Transport Inc
Central Point OR US
------------------------------

I am trying to use the PictureBox in Accuterm to  display an image of a stock item.

\\\\\\\\i can get an image displayed as created at the development of the Form but  can not find out how to change it per stock item.

It is probably very simple but I cant see how ?

Can anybody help please ?

Chris Baxter 



------------------------------
Chris Baxter
CB Soft
IPSWICH GB
------------------------------

Hi Chris - 

You mention PictureBox, which is an AccuTerm GUI component. The reply from Jon Card shows how to use escape sequence to display a picture over the terminal green screen. These are two different things. In the GUI environment, use ATGUISETPROP() to set the GPPICTURE property of the PictureBox to the path or URL of the image file. Something like:

PIXDIR = '\\\\iomega-01d006\\aix\\pictures\\drivers\\'
PIXPATH=PIXDIR:CDD.ID:'.JPG'

CALL ATGUISETPROP(GUIAPP, GUIFRM, 'mypictureboxid', GPPICTURE, 0, 0, PIXPATH, GUIERRORS, GUISTATE)



------------------------------
Peter Schellenbach
Rocket Internal - All Brands
------------------------------

Hi Chris - 

You mention PictureBox, which is an AccuTerm GUI component. The reply from Jon Card shows how to use escape sequence to display a picture over the terminal green screen. These are two different things. In the GUI environment, use ATGUISETPROP() to set the GPPICTURE property of the PictureBox to the path or URL of the image file. Something like:

PIXDIR = '\\\\iomega-01d006\\aix\\pictures\\drivers\\'
PIXPATH=PIXDIR:CDD.ID:'.JPG'

CALL ATGUISETPROP(GUIAPP, GUIFRM, 'mypictureboxid', GPPICTURE, 0, 0, PIXPATH, GUIERRORS, GUISTATE)



------------------------------
Peter Schellenbach
Rocket Internal - All Brands
------------------------------

Hi Peter,

Thanks for your input, I have done it and the GUI has not thrown any errors - I did notice a small delay when supposed to be loading 6 pictures (expected)

but no pictures have been shown 

here is the code

************************************************************
*
*
*-->BEGIN EVENT HANDLER<--*
GUI.GUIENQ.MAINENQ.TABPICS.CLICK: *
   CTRLS = ""; VALUES = ""; GVALUES=""
*   DEBUG
   READ PLST FROM NCF(F1P),CUSTNO ELSE PLST=""
   PIXDIR = '\\\\IPSSRV001\\PWS\\PHOTOS\\':CUSTNO:'\\' 
   FOR X=1 TO DCOUNT(PLST<1>,VM)
      PIXPATH=PIXDIR:PLST<1,X>
      PICNO='picture':X
      CALL ATGUISETPROP(GUIAPP,GUIFRM,PICNO,GPPICTURE,0,0,PIXPATH,GUIERRORS,GUISTATE)
      IF GUIERRORS<1> >=2 THEN GOTO GUI.ERROR
      DESC=OCONV(PLST<3,X>,'D2/'):' @ ':OCONV(PLST<4,X>,'MT'):' by ':OCONV(PLST<5,X>,'TENGINEER;X;;1')
      DESC=PLST<2,X>:VM:DESC
      CTRLS<X>='TEXT':X ;  VALUES<X>=DESC
   NEXT X
   CALL ATGUILOADVALUES(GUIAPP,GUIFRM,CTRLS,VALUES,GUIERRORS,GUISTATE) 
   IF GUIERRORS<1> >=2 THEN GOTO GUI.ERROR
   
RETURN
*-->END EVENT HANDLER<--*
*
*
************************************************************
*

The pictures are .png 

I know the URL to be correct  -   any ideas please

Blessings Chris 



------------------------------
Chris Baxter
CB Soft
IPSWICH GB
------------------------------

We are still using AccuTerm 7

      *ESC STX iL , filename , col , row , width , height , aspect, border CR
      *Displays the image file filename at column col and row row. Height and width are optional; if
      *specified (and not zero), the image is scaled to height rows and width columns. Otherwise,
      *the original image size is used. If aspect is non-zero, the image aspect ratio is preserved
      *(the specified width or height is reduced to preserve the aspect ration). Border is N for no
      *border, B for simple border, R for raised border or I for inset border style. Image file types
      *supported include BMP, JPEG, GIF, PCD, PCX, PICT, PNG, PSD, TARGA, TIFF, WBMP,
      *XBM, XPM and Windows Metafile. Images are considered "protected" data; a "clear unprotected
      *characters" command will not clear images from the terminal screen.
      *The image file does not need to be a local file; if an internet connection is available the
      *filename can specify a URL instead of a local or network file.
      *Note: AccuTerm 7 uses the FreeImage Open Source image library.
      EQUATE ESC TO CHAR(27)
      EQUATE STX TO CHAR(2)
      EQU CR TO CHAR(13)
      PIXDIR = '\\\\iomega-01d006\\aix\\pictures\\drivers\\'
      PIXPATH=PIXDIR:CDD.ID:'.JPG'
      PRINT ESC:STX:'iL,':PIXPATH:',65,3,20,6,1,B':CR:

This is what we do to display our Drivers.



------------------------------
Jon Card
VP
Combined Transport Inc
Central Point OR US
------------------------------

Hi Jon,

Thanks for your info - looks great and  I might try this when I have a spare few hours but we are developing with the GUI as the customer wants to move away from blue screen.

I know some others that might be interested 

many thanks

Chris



------------------------------
Chris Baxter
MD
CB Soft
IPSWICH GB
------------------------------

Hi Jon,

Thanks for your info - looks great and  I might try this when I have a spare few hours but we are developing with the GUI as the customer wants to move away from blue screen.

I know some others that might be interested 

many thanks

Chris



------------------------------
Chris Baxter
MD
CB Soft
IPSWICH GB
------------------------------

we do this all the time.

we use this

CALL atguisetprop(guiapp, guifrm, 'PIC_WO_OUTP', gpvalue, 0, 0, chart_nme, guierrors, guistate)



------------------------------
Jesse Tillia
Proman-ERP, Inc.
West Seneca NY US
------------------------------

we do this all the time.

we use this

CALL atguisetprop(guiapp, guifrm, 'PIC_WO_OUTP', gpvalue, 0, 0, chart_nme, guierrors, guistate)



------------------------------
Jesse Tillia
Proman-ERP, Inc.
West Seneca NY US
------------------------------

Hi Jesse,

"Keep it simple STup**"   I should apply that phrase more often    haha   

yes that works  :) 

thank you so much 

Blessing

Chris Baxter



------------------------------
Chris Baxter
CB Soft
IPSWICH GB
------------------------------