Thanks to R.G. Sherlock there is more hope for this mystery.

This script shows better what I want.  Why is the image distorted so the 
buttons do not show until the end?  If that were solved everything might be 
fine.

require 'bmp gl2'
coinsert 'jgl2'
dat=:256 #. [: |."1 [: [ 256 256 256 #: [: readbmp jpath

STUDY=: 0 : 0
pc study;
xywh 0 0 32 30;cc P1 button;cn "1";
xywh 33 0 32 30;cc P2 button;cn "2";
xywh 66 0 32 30;cc P3 button;cn "3";
xywh 0 33 300 300;cc g isigraph;
pas 0 0;
rem form end;
)

study_run=: 3 : 0
wd STUDY
wd 'pshow;ptop;'
imgfn=. '~system\examples\data\toucan.bmp'
study_g_paint imgfn
wd 'setfocus P1;'
)

study_close=: 3 : 0
wd'pclose'
)

study_P1_button=: 3 :0
wd 'setfocus P1;'
imgfn=. '~system\examples\data\toucan.bmp'
study_g_paint imgfn
NB.wd 'winexec "c:\jsoftware\j602\lla\mplayer2.exe 
c:\jsoftware\j602\lla\00will.wav";'
)

study_P2_button=: 3 : 0
wd 'setfocus P2;'
imgfn=. '~system\examples\data\jbox.bmp'
study_g_paint imgfn
NB.wd 'winexec "c:\jsoftware\j602\lla\mplayer2.exe 
c:\jsoftware\j602\lla\01will.wav";'
)

study_P3_button=: 3 : 0
wd 'setfocus P3;'
imgfn=. '~system\examples\data\toucan.bmp'
study_g_paint imgfn
NB.wd 'winexec "c:\jsoftware\j602\lla\mplayer2.exe 
c:\jsoftware\j602\lla\00will.wav";'
)
study_g_paint=: 3 : 0
glclear ''
dat=. 256 #. |."1 [ 256 256 256 #: readbmp jpath y
glpixels_jgl2_ (0 33,|.$dat),,dat
glpaint_jgl2_ ''
)

study_run ''
study_P1_button ''
6!:3 (2.5)
study_P2_button ''
6!:3 (2.5)
study_P3_button ''



**************
Start the year off right.  Easy ways to stay in shape.
     
http://body.aol.com/fitness/winter-exercise?NCID=aolcmp00300000002489
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to