Dear Sir<br>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<br>is 4.0 or 6.0)<br><br>** To create a vb interface<br>1- Add a command button and Text box to form<br>2-Add the Following Vb code for command button:<br><br>Static arr(1 To 5) As stringarray<br>Call fortarra(arr(1))<br>For I% = 1 To 5<br>Text1.Text = arr(I%).strings + Chr$(13) + _<br>Chr$(10) + Text1.Text<br>Next I%<br><br>3-Save form and project by extension name of .frm & .vbp <br>4-Add the following code for module wich creat in my project:<br><br>Type stringarray<br>strings As String * 24<br>End Type<br>Declare Sub fortarra Lib "c:\vb4\fg.dll" (myarray As stringarray)<br><br>5- save the module name of module.bas<br><br>***To create the Fortran subroutine <br>1-Write the fortran code:<br><br>subroutine fortarra(arr)<br>character(24) arr(5)<br>arr="This is a string from Fortran."<br>end subroutine<br><br>2-Save the fortran code as fg.f90<br>3-Build a DLL in Microsoft Developer Studio from command line with:<br><br>fl32/LD fg.f90<br><br>which creates a DLL named fg.dll<br>4-Copy a fg.dll to c:\vb4<br>5-Run the visual basic project but in vb4.0 message of error is " Run-time error 453<br> Specified Dll function not found"<br>and in vb 6.0 is "Run-time error 453<br> can't find Dll entry point fotarra in ..."<br><br>I want for you if possible solved this my problem and send me.<br><br>Thank You<br>Jafar Sadeghzadeh Ahari