forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Closig a window using ClearWin

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: Nürnberg, Germany

PostPosted: Fri Feb 01, 2008 1:40 pm    Post subject: Closig a window using ClearWin Reply with quote

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
Code:

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
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri Feb 01, 2008 4:30 pm    Post subject: Reply with quote

Code:
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
Back to top
View user's profile Send private message AIM Address
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: Nürnberg, Germany

PostPosted: Mon Feb 04, 2008 4:03 pm    Post subject: Minimise Reply with quote

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?

Code:

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
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Feb 04, 2008 4:27 pm    Post subject: Reply with quote

See %ww and its options.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group