Call Fortran Routines (LAPACK) From Program?

Jan 27, 2009

I have LaPack numerical package , I want to compile with Visual Fortran (INTEL) using vs2008.I want to use the routines from a VB.NET program.How can I call the routines from VB ?

View 9 Replies


ADVERTISEMENT

Call To Fortran EXE From VB Express 2010 Not Working

Apr 27, 2012

I have a button on a form that is supposed to run an executable (compiled Intel Fortran v11) on the click event. Here is the code:

Private Sub RunButton_Click() Handles RunButton.Click
Try
System.Diagnostics.Process.Start("C: estDir estCode.exe")

[Code]....

I'm certain the path is correct and I have verified that running the testCode.exe from the cmd window works as it should (testCode.out file is updated). When I try to run the process via the RunButton it appears to work...no errors are reported or caught. However, the expected output file is not updated indicating testCode.exe did not execute. All of the online support I have researched indicates this should work.

View 8 Replies

Write Fortran Or To Integrate Fortran To VB 2010?

Nov 7, 2011

I was wondering if there was a way to write fortran or to integrate fortran to Visual Basic .net 2010..Maybe with adding a refferance or something? what options are available?

View 5 Replies

Calling Fortran DLL Program?

May 11, 2011

have problem with calling a Fortran DLL from VB.net Program. The VB program provide the GUI while the Fortran DLL does the calculations.The Fortran DLL opens and reads from data files supplied by the VB program. however, DLL program displays a message that says it can not open the file.

View 1 Replies

Can Sub Routines Be Placed Into Classes For Later Use

Feb 6, 2011

I have a slew of sub routines that I need to use in my software because each website that I will be accessing don't all use the same methods.....go here...click that...go here...click that...etc etc

So I've divided them into sub routines and call them when I need them but the coding is getting so long that it's becoming confusing to keep up with each sub.

Is it possible to place the sub routines into an independent file like a class and then call them from the file when I need them so I can free up some space to code?

View 1 Replies

Routines With The Same Name But Different Arguments

Oct 15, 2010

I am listing the following three subrointines....

Private Sub OutPut(ByVal Offset As Long, ByRef path As String) 'Orig
If Not cbFiles.Checked Then
item1 = New ListViewItem(Offset)

[Code]....

They have the same name but a) different types of aguments or different numbers of arguments. This is legal in VB.

View 1 Replies

Detrmine The Time Taken For Various Routines?

May 3, 2010

VB 2010 express Win XP pro I'm tryimg to detrmine the time taken for various routines, and not having much luck.From what I can gather, it seems that short times and very long times are a problem, as is my understanding of what I have read. cpu speed shown is correct.I checked a few routines, very short routines return 0, to be expected, ?resolution.Longish times (about 33 seconds with a stopwatch), report to be 177 seconds.

[Code]...

View 9 Replies

Link Routines To Combo Box Selectedindex

Jun 11, 2009

I'm trying to have it so that when the user selects an item from the combo box, it will display the right nodes for that selection in the treeview control. For example: User selects Artist from the combo box and the treeview displays the letter of the artist. The user selects a letter and it will display all artist with last names beginning with that letter. Unfortunately when I select a selectedindex, the treeview doesn't display anyting, it's blank. What am I doing wrong? Here's the code I'm using for artists:

[Code]...

View 1 Replies

Link Vb To FORTRAN?

Oct 5, 2006

I have several subroutines which are written in FORTRAN.

1) how I need to compile the FORTRAN subroutines?

2) what I need to do within VB 2005 to call these FORTRAN subroutines within the VB 2005 code?

View 1 Replies

Asp.net - Moving Common Routines To The App_Code Class?

Jan 22, 2010

I have some common code that I would like to share between pages and I have been messing around with App_Code classes which is great but I would also like to use code that affects drop down lists example:

Sub Set_FirmType(ByVal Sender As Object, ByVal E As EventArgs)
subcategories.Visible = "false"
supplycategories.Visible = "false"

[code]....

Is their a way to put this in my App_Code class?

View 1 Replies

C# - Way To Implement Caliburn-like Co-routines In Since There's No Yield Keyword?

Mar 26, 2010

Note that I'm aware of other yield in vb.net questions here on SO. I'm playing around with Caliburn lately. Bunch of great stuff there, including co-routines implementation.

Most of the work I'm doing is C# based, but now I'm also creating an architecture guideline for a VB.NET only shop, based on Rob's small MVVM framework.Everything looks very well except using co-routines from VB. Since VB 10 is used, we can try something like Bill McCarthy's suggestion:

[Code]...

It definitely isn't as elegant as C# version, but it looks to be doable. We'll see if there are any problems with this. If anyone has better idea, I'm all ears.

View 1 Replies

Threading - Baton Object That Routines Can Pass Around?

Feb 20, 2011

This will no doubt sound like a pretty dumb question to some, but, despite having written many useful single-thread apps over the years, I don't understand enough about threading yet.

Consider this scenario:

There are four modules, each on its own thread, that can happily run concurrently most of the time. However, each module occasionally causes a few seconds' intensive disk activity (by design) and it would be more efficient (faster, less fragmentation) if only one module at a time wrote to the same physical drive.

It would be useful to have something like a baton that modules within a given scope can pass around, perhaps dependent on their respective priority levels.

View 2 Replies

Using PInvoke To Access Some Routines From A Third Party Library?

Sep 9, 2009

I'm using PInvoke to access some routines from a third party library, however i'm getting SEHExceptions when trying to use callbacks defined for one particular method. The callbacks are used to provide feedback from other unmanaged methods within the third party library, passing a string back to the calling application containing a status message.

[Code]...

View 18 Replies

Write XML Document To Group Information From Two Different Sub Routines

Jan 19, 2012

I am trying to retrieve all processes running on a machine with the usual information; process id, name and the memory usage. I am trying to export it all under one xml file, however to get all the information I had to use 2 separate methods. To get the process id, name and session id (process owner) I used the following code along with a dictionary and a class, using a .net library called Cassia.

Using server As ITerminalServer = manager.GetRemoteServer("Spartacus")
server.Open()
For Each process As ITerminalServicesProcess In server.GetProcesses()
If Not String.IsNullOrEmpty(process.ProcessId) Then
dictprocess.Add(process.ProcessId, New Processes(process.ProcessId, process.ProcessName, process.SessionId))
[Code] .....

As you can see the unique id (process id) is the same in each xml. Is there any way I can write the xml so that the information from both methods can be under one tag?

View 1 Replies

Application Calling Fortran Exe

Nov 18, 2010

I am running one fortran exe in .net application(calling from command line with the help of system diagnostic process). If we directly click on fortran exe, it shows inputs to enter for fortran in command window, after input entered it gets executed. We want same behaviour but want to run fortran exe from .net application, If we click on button in vb.net form, this exe should get called and should show inputs to enter on the command line, once inputs entered it should execute. How to achieve this with .net application? Right now, after clicking on button in vb.net form, exe get's opened in command window, but it is blank, and gets hanged. [code]

View 1 Replies

Passing Argument To Or From A FORTRAN DLL From .NET?

Feb 1, 2010

I have a DLL written in fortran that I know works because I am getting it from a working software package that we use daily. I am trying to call it from anything but am having problems i believe with passing the correctly formatted arguments in and out of it, so i decided to try and access it from a VB program. I chose VB because I have contacted the developer of the software package we are using and he gave me his DLL function call in VB6, even though he is not allowed to show me the FORTRAN source.

Problem is (perhaps, i think) that I am writing in VB.NET, which has different data types than VB6. Can anyone see why i am am having problems. The error i get upon running is: "AccessViolationException was unhandled: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

[Code]...

View 3 Replies

VS 2005 Run Fortran Exe From .net Application?

Nov 18, 2010

I am running one fortran exe in .net application(calling from command line with the help of system diagnostic process).If we directly click on fortran exe, it shows inputs to enter for fortran in command window, after input entered it gets executed.We want same behaviour but want to run fortran exe from .net application,If we click on button in vb.net form, this exe should get called and should show inputs to enter on the command line, once inputs entered it should execute. How to achieve this with .net application?

Right now, after clicking on button in vb.net form, exe get's opened in command window, but it is blank, and gets hanged.Below is the error forrtl: error (200): program aborting due to window-CLOSE event Image PC Routine Line[code]....

View 1 Replies

Forms :: .net Windows App To Perform Routines At Regular Intervals?

Jul 11, 2010

i have a need for my vb.net app to perform methods at regular intervals. it needs to check sql tables and react to data found, send email and sms messages. i've tried using a loop but this only allows me to perform 1 check ie checking sql tables. the app needs to execute a method every x minutes. i tried using system threading but i got errors.

View 1 Replies

How To Hook Up Keypress Events For Cut / Copy And Paste Routines

Nov 5, 2009

I have a Windows Forms app, with a TabControl. On the first tab (which is a bunch of textboxes), the CTRL-x/c/v keyboard shortcuts for cut/copy/paste work as expected. On the second tab (which is a DataGridView), the keyboard shortcuts don't do anything. How do I hook up these keypress events to my cut/copy/paste routines? I already have great cut/copy/paste routines for my DataGridView--and they work fine when launched from the tooltip buttons or menus. I just need to hook up those subs to the CTRL-x/c/v keypress events.

View 2 Replies

VS 2008 - Annotating Functions / Sub Routines / Methods And Properties

Mar 25, 2010

Is there a way to annotate functions, subs, properties, and methods so that tool tips will pop-up in the IDE as they're being defined or selected?

View 2 Replies

VS 2010 : Multithreading And Accessing Other Routines/form Properties?

Mar 1, 2011

I'm writing a really simple file updater which downloads files off from a website and saves them. The download routine is working well, except that it freezes the project while attempting to connect to the host. Easily solved with threading except now when I try to access other form items such as text boxes, labels, form caption, it says I am not doing it in a safe manner and prompts an interrupt in debug. I did some reading on it and I'm still not sure what to do, I'm very new to vbnet and it is still a little confusing to me.

Error: Cross-thread operation not valid: Control 'Form1' accessed from a thread other than the thread it was created on.
Imports System.Threading
Imports System.Net
Imports System.IO

[code]....

View 8 Replies

AccessViolationException Was Unhandled - Calling Fortran Dll

May 27, 2010

I have a subroutine that was written in fortran that I need to call from VB.NET where all of my other functions are written. I did not write the fortran, and hardly know fortran. I am getting the below exception on my dll function call and don't know how to fix it. I wonder if it is due to incongruent variable lengths? I have the source for my fortran and compiled it using the g95 compiler. I have tried compiling it with a flag on which is supposed to force all of the reals to 32 bits (-r4). It weirds me out that you don't seem to be required to initialize variables before use in fortran. I thought it was supposed to be a ridged language.

[Code]...

View 2 Replies

Calling Fortran DLL From VB (Character Strings)

Jul 14, 2011

I am trying to call a fortran DLL from VB.NET. Fortran function requires two character strings to be passed from VB to fortran. I am able to run the code with a change after receiveing a AccessViolationException error. I dont understand why it worked can
some one whose professional explain me the difference. Here I am attaching the codes for reference

[Code]...

View 1 Replies

Calling Fortran DLL, Cannot Work In The Loop

Jan 15, 2010

I am calling a Fortran dll from vb.net. It works when I call it it one time only. When I put that in a loop, it works for the first time and second time it quits the program. How can I run this in a loop?

View 4 Replies

Closing Exe (including A Fortran Dll) After Executing?

Apr 20, 2010

I have 2 source codes in fortrran (I have not written them). I visualized these codes by linking them to VB2005.when I excuate the VB.exe, when VB calls one of these DLLs, there is no problem, but in calling the other DLL, the DLL is executed but the VB.exe is closed and the interface page to the user goes out.

View 1 Replies

Pass A String From VB 2010 To A Fortran DLL?

Aug 3, 2011

I can pass integers, singles, doubles, and arrays of all these back and forth with no problem. But I can't figure out how to pass a string in Visual Basic 2010 to a character variable in the Fortran DLL. I keep getting the PInvokeStackImbalance error. I could just convert the Visual Basic string to an integer array containing the ASCII code for each character, send that, and convert back inside the DLL, but that's pathetic. There must be a simple way to do this.

I first tried using Dim txt(50) as Char in VB2010, and character*50 txt in the DVF F90 DLL but that didn't work.

Then I tried Dim txt as String in Visual Basic 2010 and made the string 50 characters long (also tried 49) but this didn't work.

View 2 Replies

Passing Structures As Arguments For A Fortran DLL?

Sep 11, 2010

I could pass a User Defined Type data structure to a Fortran DLL, that contained Short Integers, Singles (real variables) and a series of Fixed Arrays, both short integers and real variables.I am upgrading my VB6 app to Visual Studio 2008 - VB, and I want to keep the same data structures as they are used in about 300,000 lines of code.I modified the Data Structure as follows below, making sure it is of Explicit Layout, since I want the position of all variables to be the same both in VS 2008 and Fortran.Two problems arise:

1) if the LayoutKind is Explicit, such as in the example below (only part of the data structue is shown, where "..." indicate part of omitted data structure members), whenever I try to run my app, I get the following exception message, which indicates that the VBFixedArray declared at Offset 154 is in conflict with some other object, unnamed by the exception handler.

Message="Could not load type 'MyApp.SomeStruct' from assembly 'MyApp, Version=1.32.3906.33480, Culture=neutral, PublicKeyToken=null' because it contains an object field at offset 154 that is incorrectly aligned or overlapped by a non-object field."

Source="MyApp"
TypeName="MyApp.SomeStruct"
StackTrace:[code]....

2) if the LayoutKind is Sequential, the app will start, all the data preceding the VBFixedArrays is passed to the Fortran Dll without problem; everything that follows the VBFixedArray is garbled and unusable. To check this, I have made a Fortran subroutine in the Dll to which I pass both the Data Structure and a vector; in the Fortran subroutine, all the elements of the data structure are equivalenced to individual positions in the vector; upon return from the Fortran subroutine, I compare the elements of the data structure and those of the vector.

The problem here is that the Data Structure contains some 1300 names, and is used extensively in the application, as it is the way to pass elegantly a lot of data pertaining to a mathematical model with only one adress when accessing the Fortran Dll, in which the computing engine lies.

<StructLayout
<StructLayout(LayoutKind.Explicit, Size := 9226, CharSet := CharSet.Ansi)>
Public Structure SomeStruct[code]......

View 5 Replies

VS 2008 : Run A Fortran Executable From A VB Form?

Nov 18, 2009

My challenge is to prepare for a presentation using a GUI interface to access a program written in Fortran.The Fortran program reads a data file and then writes an output file.For the presentation I need to be able to change a variable value in a VB form, update the data file, and run the Fortran program from the VB form.I also need to be able to create graphs using VB forms using the output file generated by the Fortran program.

View 2 Replies

Strings.format Command Fails In DataGridview Handler Routines?

Mar 7, 2011

The VB format(object,formatString) command fails when placed in the handler routines of a DataGridView.In the following procedure the newCellValue returns the Format string value instead of a formatted cell value.This pproblem occurs in both the dgv_CellFormatting and the dgv_CellClick routines.The same commands work properly when placed in a procedure on the form.

Private Sub dgv_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles dgv.CellFormatting
If e.FormattingApplied = False And Not e.CellStyle.Format = Nothing Then[code]...........

View 2 Replies

Pass An Object As A Parameter To A Fortran Method?

Aug 25, 2010

I'm currently working on being able to import a DLL written in Fortran into Visual Basic. I've got all the basics down, so now I'm trying to take it a step further. The title basically says it all, but I'll explain what it is I'm trying to do anyways.

For kicks and giggles, let's just assume I want to pass an object that has three double values in it, possibly representing a point in space in three dimensions. In my Fortran method, I want to take that object, print out the x value, then change the x value to 7.5. Here's my Fortran code that does just that.[code]...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved