Opening an fotran .exe file from Visual Basic

  • Thread starter Thread starter jaap de vries
  • Start date Start date
  • Tags Tags
    File Visual
AI Thread Summary
To execute a Fortran .exe file from Visual Basic, the Shell command can be used effectively, allowing users to run the executable with a button click. However, issues may arise when the Fortran program attempts to read input from a file when launched through Visual Basic, even though it functions correctly when run directly from the Fortran compiler. This indicates that the working directory or file path context may differ when the executable is called from Visual Basic, potentially affecting its ability to locate and read the input files. Adjusting the working directory or ensuring the input file path is correctly specified may resolve this issue.
jaap de vries
Messages
166
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?
 
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Back
Top