Dear Ian,
thank you very much for your prompt help, now I understand it and the code below works fine.
But still 2 questions:
- is it possible to youse a no_border function, the %co[no_data_border] does'nt work?
- is it possible to center the box in the outer border?
Thank you very much.
winapp 0,0
program ms
implicit none
include<windows.ins>
integer*4 i
integer*4 sel(4),selmax
common/isel/sel,selmax
character*8 cline(4)
external cb_func,ienter_monitor,idown_monitor,iup_monitor
external left_monitor,right_monitor,home_monitor,end_monitor,iesc_monitor
data cline( 1) /'1 alpha'/
data cline( 2) /'2 beta '/
data cline( 3) /'3 gamma'/
data cline( 4) /'4 delta'/
selmax = 4
sel(1) = 1
do 5 i = 2,selmax
5 sel(i) = 0
i=winio@('%ac[Enter]&',ienter_monitor)
i=winio@('%ac[DOWN]&', idown_monitor)
i=winio@('%ac[UP]& ', iup_monitor)
i=winio@('%ac[LEFT]&', left_monitor)
i=winio@('%ac[RIGHT]&',right_monitor)
i=winio@('%ac[Tab]&' , right_monitor)
i=winio@('%ac[HOME]&', home_monitor)
i=winio@('%ac[PgUp]&', home_monitor)
i=winio@('%ac[END]&' , end_monitor)
i=winio@('%ac[PgDn]&', end_monitor)
i=winio@('%ac[ESC]&' , iesc_monitor)
i=winio@('Select a greek: %^`8.4ms',cline,4L,sel,cb_func)
write(*,*)sel
end
!-----------------------------------------
integer*4 function cb_func()
!-----------------------------------------
include <windows.ins>
cb_func = 0
! call window_update@
end
!-----------------------------------------
integer*4 function ienter_monitor()
!-----------------------------------------
include <windows.ins>
ienter_monitor=0
end
!-----------------------------------------
integer*4 function idown_monitor()
!-----------------------------------------
include <windows.ins>
integer*4 sel(4),selmax
common/isel/sel,selmax
if(sel(4).eq.1)then
sel(4)= 0
sel(1)= 1
go to 20
endif
do 10 k = 1,3
if(sel(k).eq.1)then
sel(k) = 0
sel(k+1) = 1
go to 20
endif
10 continue
20 continue
idown_monitor=1
end
!-----------------------------------------
integer*4 function iup_monitor()
!-----------------------------------------
include <windows.ins>
integer*4 sel(4),selmax
common/isel/sel,selmax
if(sel(1).eq.1)then
sel(1)= 0
sel(4)= 1
go to 20
endif
do 10 k = 4,2,-1
if(sel(k).eq.1)then
sel(k) = 0
sel(k-1) = 1
go to 20
endif
10 continue
20 continue
iup_monitor=1
end
!-----------------------------------------
integer*4 function left_monitor()
!-----------------------------------------
include <windows.ins>
left_monitor=1
end
!-----------------------------------------
integer*4 function right_monitor()
!-----------------------------------------
include <windows.ins>
right_monitor=1
end
!-----------------------------------------
integer*4 function home_monitor()
!-----------------------------------------
include <windows.ins>
integer*4 sel(4),selmax
common/isel/sel,selmax
home_monitor=1
do 50 k = 1,selmax
50 sel(k) = 0
sel(1) = 1
end
!-----------------------------------------
integer*4 function end_monitor()
!-----------------------------------------
include <windows.ins>
integer*4 sel(4),selmax
common/isel/sel,selmax
end_monitor=1
do 60 k = 1,selmax
60 sel(k) = 0
sel(selmax) = 1
end
!-----------------------------------------
integer*4 function iesc_monitor()
!-----------------------------------------
include <windows.ins>
integer*4 sel(4),selmax
common/isel/sel,selmax
iesc_monitor=0
do 70 k = 1,selmax
70 sel(k) = 0
end