Topic: Windows apps

Is it possible to develop full fledged windows app with Simply Fortran. If so, how?

Re: Windows apps

It depends on the application you're trying to develop.  If you're planning to use Fortran only, then we do provide the AppGraphics library to create windows, menus, drawing surfaces, buttons, etc. from a Fortran (or C) program.  The library is somewhat low-level and simple, though, so it might not contain every feature you're thinking of.

You can also use GTK+ with Simply Fortran, of course.  If you're feeling adventurous, you can develop a true Win32 application in C (which is how Simply Fortran is written); Simply Fortran includes all the Windows-specific headers and libraries needed.  We do not provide a direct Win32 interface from Fortran, though.

Can you provide a bit more detail about what you're thinking about writing?  Perhaps we can provide some tips or guidance.

Jeff Armstrong
Approximatrix, LLC

Re: Windows apps

I've also used DISLIN to create a GUI for a Windows app written and built using SF.

Another idea is to program the 'app' to send output not only to the GUI but also to output files that your program writes as text files with RTF code embedded in the text output.  You can then have formatted results with underlining, boldface, page-breaks and so forth, and even vector graphics in your output file, ready for opening with M$Word.  You need to learn 'RTF code to do this but it's not very difficult.
---
John

Re: Windows apps

I wanted to quickly mention, as part of this thread, that we've actually published a small utility for connecting to Virtual Network Computing (or vnc) servers that is written using AppGraphics and Fortran:

https://www.microsoft.com/en-us/p/quick … dq6hk8w3m2

The manager in the screenshots that list the servers and allow connections is written in Fortran and AppGraphics with a small shim in to access Windows CreateProcess with input/output pipes (to transmit usernames and passwords).  So, yes, you can write a Windows application in Simply Fortran and actually get it published in the Microsoft Store.

Jeff Armstrong
Approximatrix, LLC

Re: Windows apps

SOME ROUGH IDEAS

Fortran programs were once structured in a linear way. 

- Open and read-in the data input file
   OR
   Send prompts to the screen and read all keyboard input

- Process the data

- Send the results to
   the screen, or
   a printer, or
   an output file
 
To create a Windows app, structure your program differently:

Design on paper your proposed GUI, with menus and/or buttons
to make it do stuff.

Write a program structure that just runs the GUI.
Write your GUI source code using SF Appgraphics or DISLIN (etc)
(I suggest Appgraphics but DISLIN is also excellent)

Some of the GUI menus/buttons will call routines for opening input data files, or displaying data entry gadgets on screen, such as drop-downs, input-text-box fields, data entry table tables etc..  Write the Appgraphics calls to generate these and make them do as required.  Some of the GUI menus/buttons will need to call your data processing code.

Write the main processing code.

Write the results-output code.  You might want this to send results or output to
- a gadget in your program window, or
- another window, or
- an output file that you have opened from the GUI, or
- variables/arrays in memory, for the user to interrogate using the GUI.
---
John