test;siz;file;pos
file←'C:\Users\ray_c\Downloads\APL\apl.png'
siz←500 500
pos←50 50
'icon'⎕WC'Icon'file
'f'⎕WC'form'('Test')('Posn'pos)('Size'siz) ⍝ create the form
'f'⎕WS('Coord' 'pixel')('BCol'(0 0 0))('State' 0) ⍝ set some settings
'f.mb'⎕WC'MenuBar'('Data'(⎕AI[3])) ⍝ Add a menu bar
'f.mb.q'⎕WC'MenuItem' 'Quit'('Event' 'Select' 'Stop')⍝ menu button to stop/kill eveything
'f.i'⎕WC'Image'(pos)('Picture'('icon')) ⍝ add the icon
But I dont know how I can place it on the MenuBar, as using
My first attempt is to put a picture on a menuitem.
A menu can have an ImageListObj. A MenuItem can have an ImageIndex.
'f'⎕WC'form'('Test')('Posn'pos)('Size'siz) ⍝ create the form
'f'⎕WS('Coord' 'pixel')('BCol'(0 0 0))('State' 0) ⍝ set some settings
'f.mb'⎕WC'MenuBar'('Data'(⎕AI[3])) ⍝ Add a menu bar
'f.mb.m'⎕WC'menu' 'mymenu'('imagelistobj' '#.f.iml1')
'f.i'⎕WC'Image'(pos)('Picture'('icon')) ⍝ add the icon
'f.iml1'⎕WC'imagelist'
i←1
j←1
:While j<10
('f.iml',(⍕i),'.','b',(⍕j))⎕WC'bitmap'('cbits'(32 32⍴⍳250))
j+←1
:EndWhile
j←1
'f.mb.m.q'⎕WC'MenuItem' 'Quit'('imageindex' 1)('Event' 'Select' 'Stop')⍝ menu button to stop/kill eveything