Silverfrost Forums

Welcome to our forums

Using WINAPP

18 Jan 2011 1:49 #7534

Using Winapp statement at the start of a programme works fine I get a nice white window...but can I get it to fully fill the pc screen?

18 Jan 2011 2:27 #7537

Look at the %ww options, e.g.: WINAPP INTEGER i,x,winio@,N PARAMETER(N=1000) REAL8 p1,p2,p3,y(N) character(len=128) :: option c---Prepare the data. p1=1.5 p2=150.0 p3=15 x=0 DO i=1,N y(i)=p1sin(x/p3)*exp(-x/p2) x=x+1 ENDDO c---Display a window containing the graph. i=winio@('%ww[no_border,maximise]&') i=winio@('%ca[SIMPLEPLOT-Damped wave]%pv&') option = '%pl[x_axis=Time(Miliseconds),y_axis=Amplitude,]' i=winio@(option,400,300,N,0.0D0,1.0D0,y) END

18 Jan 2011 3:09 #7538

Not sure you have understood my query....

I merely want to extend the data input 'WINAPP window', not using any graphics as shown by youself...but thanks..any clearer?

18 Jan 2011 3:14 #7539
      WINAPP
      INTEGER i,winio@
      i=winio@('%ww[no_border,maximise]&')
      i=winio@('%ca[Use the full screen]')
      END
18 Jan 2011 4:12 #7541

Got this to work on its own, but when I put it in my main program it failed to compile...did not say why though...FTN95 does this alot ie. not explain why a prog has not compiled why is that??? I did of course remove the END statement

19 Jan 2011 7:23 #7542

Can you post a part of your programe where this error occur? This would help to get your program work.

19 Jan 2011 11:00 #7545

OK here it is I Intially put your code where WINAPP currently sits (WINAPP does work here but as I wrote I want to maximize the window) Note: Not sure why but a smilyface as occured twice where there should be an eight followed by a close bracket ?

PROGRAM EVA WINAPP DIMENSION TCOG(3),PXYZ(3),POSM(3,7),PRPM(10),PRESS(10,8,721),SUM(3),RMS(100,3,6) INTEGER2 IR COMPLEX GENG(58,721),DIS(512,3,6) COMMON /INTG1/ NPT,NCYL,NBRG,IGRP,IANG(8),NPOS,NRPM COMMON /REAL1/ RPM,P(8,721),BDIS(9),WR(9),RALPH(9),F1(9),F2(9),F3(9),F4(9),WROT,WREC,R,CL,D,PMOD(8),TILT,DVEE,TDIS(9),GR COMMON /REAL2/ COG(3),EM,SM(6) COMMON /REAL3/ THETA(2,721) COMMON /COMP1/ GENG COMMON /COMP2/ DIS COMMON /COMP3/ RMS COMMON /CHAR1/ CAR,ENG CHARACTER1 ANS,ICR CHARACTER8 DD1 CHARACTER44 FNAME1 CHARACTER40 ENG CHARACTER60 CAR OPEN (10,FILE='engine.dat', STATUS='OLD') OPEN (15,FILE='EVA_out.csv',STATUS='OLD') OPEN (16,FILE='test.csv',STATUS='OLD'

19 Jan 2011 11:35 #7546

WINAPP should be before PROGRAM

19 Jan 2011 12:01 #7547

To post code use the code environment (there are several other options).

In the following example I get a maximised window.

WINAPP
PROGRAM EVA
DIMENSION TCOG(3),PXYZ(3),POSM(3,7),PRPM(10),PRESS(10,8,721),SUM(3),RMS(100,3,6)
INTEGER*2 IR ,RES,winio@
COMPLEX GENG(58,721),DIS(512,3,6) 
COMMON /INTG1/ NPT,NCYL,NBRG,IGRP,IANG(8),NPOS,NRPM 
COMMON /REAL1/ RPM,P(8,721),BDIS(9),WR(9),RALPH(9),F1(9),F2(9),F3(9),F4(9),WROT,WREC,R,CL,D,PMOD(8),TILT,DVEE,TDIS(9),GR 
COMMON /REAL2/ COG(3),EM,SM(6) 
COMMON /REAL3/ THETA(2,721) 
COMMON /COMP1/ GENG 
COMMON /COMP2/ DIS 
COMMON /COMP3/ RMS 
COMMON /CHAR1/ CAR,ENG 
CHARACTER*1 ANS,ICR 
CHARACTER*8 DD1 
CHARACTER*44 FNAME1 
CHARACTER*40 ENG 
CHARACTER*60 CAR 

OPEN (10,FILE='engine.dat') 
OPEN (15,FILE='EVA_out.csv') 
OPEN (16,FILE='test.csv')
res=winio@('%ww[no_border,maximise]&')
res=winio@('%fn[arial]Einstein said %tsE=MC%su2%`su.',1.8D0)
END
19 Jan 2011 3:40 #7556

Thanks for your efforts JJ were getting there when I use what you ahve done I certainly get a full window with E=MC2 ....but thats it, I then have to close that down and my normal smaller window is behind...what else do I need to modifiy obviously e=mc2 comment I guess??? But I need to it to goto requesting a variable input as my window below does....ie some written text to screen requesting a variable input.

19 Jan 2011 3:49 #7557

Perhaps you should have a look here.

19 Jan 2011 4:08 #7558

Cannot see the point in jumping around...besides tried them examples and it complained about not finding MSWIN...!!!!

Going back to the original requirement can I not simply give WINAPP some kind of simpler arguments to set the window size....

20 Jan 2011 10:27 #7568

The original topic addressed is to open a maximaised window. For that you need to set the %ww options. From comments in the thread it seems like some output to a DOS box must be redirected to the window. For that a %cw (Clearwin window) must be used, e.g. winapp program enum use mswin implicit none integer :: i,j,ctrl character(len =20):: string ctrl = -1
i=winio@('%ca[Redirect]&') i=winio@('%sy[thin_border]&') i=winio@('%bg[BTNFACE]&')
i=winio@('%mn[E&xit]&','EXIT') i=winio@('%ob[depressed]%40.20cw[vscroll]%cb&',0) i=winio@('%lw',ctrl) write(,) 'Program EVA' write(,) write(,) 'I assume that something like' write(,) 'this should do the thing.' end program enum

A small (complete) example program will be helpful in understanding the actual problem addressed in this thread. If mswin is not found, it means the the module paths is incorrect.

20 Jan 2011 2:21 #7578

In your original suggestion you did not use mswin...nevertheless I compiled your last code but it complains again cannot find mswin....so where should this be what path?

20 Jan 2011 3:47 #7581

You can set the include (or module) paths under Projects->Properties->Source. Below you see the complete result (try include <windows.ins> instead). [URL=http://img109.imageshack.us/i/evad.png/]http://img109.imageshack.us/img109/1348/evad.png[/URL]

Uploaded with [URL=http://imageshack.us]ImageShack.us[/URL]

25 Nov 2011 10:01 #9290

This is a great thread (works also without include <window.ins>)

My additional question: I want the window 'redirect' automatically close itself when the main program is finished by Stop or End. How to get that?

25 Nov 2011 11:11 #9291

Usually you will use %lw if you open more than one window. Let all %lw's be connected with the same integer variable (handle), say ctrl. Now, if you stop your program, just write

ctrl = 0
call window_update@(ctrl)

before end.

Regards - Wilfried

25 Nov 2011 4:27 #9294

Hello Wilfried, well, I tried call window_update@(0) which doesn't close, but you are right: ctrl = 0 call window_update@(ctrl)

is closing the window Thanks

Please login to reply.