Opening an fotran .exe file from Visual Basic

  • Thread starter Thread starter jaap de vries
  • Start date Start date
  • Tags Tags
    File Visual
Click For Summary

Discussion Overview

The discussion revolves around the integration of a Fortran executable (.exe) file with Visual Basic, specifically how to execute the Fortran program from a Visual Basic interface. The focus is on practical implementation and troubleshooting related to file input handling.

Discussion Character

  • Technical explanation
  • Experimental/applied

Main Points Raised

  • One participant seeks to execute a Fortran .exe file from Visual Basic to enhance user interface capabilities.
  • Another participant suggests using the Shell command in Visual Basic to run the executable.
  • A later reply confirms that the Shell command works for executing the .exe file but raises an issue regarding the executable's inability to read input from a file when launched from Visual Basic.
  • The same participant notes that the Fortran program functions correctly when run directly from the Fortran compiler, indicating a potential issue with how input is handled in the Visual Basic environment.

Areas of Agreement / Disagreement

Participants generally agree on the method of using the Shell command to execute the Fortran program, but there is a disagreement regarding the input handling when the program is run from Visual Basic, which remains unresolved.

Contextual Notes

The discussion highlights limitations related to input file handling when executing the Fortran program from Visual Basic, suggesting a dependency on how the execution context is set up.

jaap de vries
Messages
168
Reaction score
0
Opening a fortran .exe file from Visual Basic

Dear friends,

I want to do something that is probably not too hard, I just can't figure it out. I want to call a executable (.exe) file that I have written in Fortran from my visual basic code. Let's say push a button and it automatically runs my (.exe) program. This way I would combine computational efficiency with a nice graphical user interface.

Any suggestions?
 
Last edited:
Computer science news on Phys.org
As far as i remember there was a command like:

Shell("c:\wherever\something.exe")
 
Thanks this seems to work.
 
Hi, I tried the shell command in visual basic and it works, but the problem is the something.exe file is not able to read the input from a file. However when it is opened directly (ie not from visual basic, but from fortran compiler), it works fine. Can you help me?
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
Replies
15
Views
11K
  • · Replies 2 ·
Replies
2
Views
6K
Replies
10
Views
3K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 14 ·
Replies
14
Views
7K
Replies
4
Views
3K
  • · Replies 16 ·
Replies
16
Views
8K
  • · Replies 1 ·
Replies
1
Views
10K