Silverfrost Forums

Welcome to our forums

Closig a window using ClearWin

1 Feb 2008 12:40 #2725

Hi,

I am using a bar to display the progress of a simulation program. Normally I close this using the default X at the top right of the window containing the bar.

In future the bar window should close automatically after the simultion is done. The problem is that I do not know how to to this. Running the small example program below explains the problem.

How can I close the bar from inside the program?

Jacques

winapp
include <windows.ins>
integer ctrl
double precision d
d = 0.0d0
i = winio@('%ca[Bar format]&') 
i = winio@('Processing ....%2nl&')
i = winio@('%20br&',d,RGB@(255,0,0))
i = winio@('%lw',ctrl)
do while(d < 1.0d0)
  do i=1,100000
  enddo
  d=d+0.01d0
  call window_update@(d)
enddo
end
1 Feb 2008 3:30 #2727
winapp 
include <windows.ins> 
integer ctrl 
double precision d 
d = 0.0d0 
i = winio@('%ca[Bar format]&') 
i = winio@('Processing ....%2nl&') 
i = winio@('%20br&',d,RGB@(255,0,0)) 
i = winio@('%lw',ctrl) 
do while(d < 1.0d0) 
  do i=1,100000 
  enddo 
  d=d+0.01d0 
  call window_update@(d) 
enddo
ctrl = 0 
call window_update@(ctrl) 
end 
4 Feb 2008 3:03 #2730

Hi Paul,

thanks! It works now as I expected it to work.

Another minor thing that I cannot figure out or at least does not work is to open the window with a minimise button. Only a X appear at the top right of the window. During a verly long simulation I would like to minimise the window. How do I get the minise button to be active?

winapp
include <windows.ins>
integer ctrl
double precision d
d = 0.0d0
i = winio@('%mi[pre]&') 
i = winio@('%ca[Test]&')
i = winio@('Processing ....%2nl&')
i = winio@('%20br&',d,RGB@(255,0,0))
i = winio@('%lw',ctrl)
do while(d < 1.0d0)
  do i=1,100000
  enddo
  d=d+0.01d0
  call window_update@(d)
enddo
ctrl = 0
call window_update@(ctrl)
end

resources
pre ICON solve.ico

Jacques

4 Feb 2008 3:27 #2731

See %ww and its options.

Please login to reply.