Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How mixed FPS4.0 with VB?

How mixed FPS4.0 with VB?

How mixed FPS4.0 with VB?

Dear Sir
I want to create user interface to my fortran program in vb,but I not able ,according following procedure which I consider for sample program:(my program written by fortran power station 4.0 and  also my vb version
is 4.0 or 6.0)

** To create a vb interface
1- Add a command button and Text box to form
2-Add the Following Vb code for command button:

Static arr(1 To 5) As stringarray
Call fortarra(arr(1))
For I% = 1 To 5
Text1.Text = arr(I%).strings + Chr$(13) + _
Chr$(10) + Text1.Text
Next I%

3-Save form and project by extension name of .frm & .vbp
4-Add the following code for module wich creat in my project:

Type stringarray
strings As String * 24
End Type
Declare Sub fortarra Lib "c:\vb4\fg.dll" (myarray As stringarray)

5- save the module name of module.bas

***To create the Fortran subroutine
1-Write the fortran code:

subroutine fortarra(arr)
character(24) arr(5)
arr="This is a string from Fortran."
end subroutine

2-Save the fortran code as fg.f90
3-Build a DLL in Microsoft Developer Studio from command line with:

fl32/LD fg.f90

which creates a DLL named fg.dll
4-Copy a fg.dll to c:\vb4
5-Run the visual basic project but in vb4.0 message of error is " Run-time error 453
           Specified Dll function not found"
and in vb 6.0 is "Run-time error 453
       can't find Dll entry point fotarra in ..."

I want for you if possible solved this my problem and send me.

Thank You
Jafar Sadeghzadeh Ahari

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close