- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All,
i am a newbie in Fortran, and would like to connect C# to F90.
I am trying to write a F90 Subroutine, which controlled a C# Windows.Forms but it always failed. I use VS2005 with IVF9.1
t
he F90 Code:
program test1
implicit none
interface
subroutine THISFORM1(xSize,ySize)
!DEC$ ATTRIBUTES STDCALL, ALIAS :'Form1' :: THISFORM1
integer xSize
integer ySize
end subroutine
end interface
call THISFORM1(500,500)
end program test1
----------------------------------------
and the C# code (Form1.cs)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
namespace WindowForm
{
public class Form1 : System.Windows.Forms.Form
{
private System.ComponentModel.IContainer components = null;
public Form1(int xSize, int ySize)
{
InitializeComponent(xSize, ySize);
}
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent(int xSize, int ySize)
{
components = new System.ComponentModel.Container();
this.Size = new System.Drawing.Size(xSize, ySize);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
}
}
can you help me?, thanks very much
Erwin
i am a newbie in Fortran, and would like to connect C# to F90.
I am trying to write a F90 Subroutine, which controlled a C# Windows.Forms but it always failed. I use VS2005 with IVF9.1
t
he F90 Code:
program test1
implicit none
interface
subroutine THISFORM1(xSize,ySize)
!DEC$ ATTRIBUTES STDCALL, ALIAS :'Form1' :: THISFORM1
integer xSize
integer ySize
end subroutine
end interface
call THISFORM1(500,500)
end program test1
----------------------------------------
and the C# code (Form1.cs)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
namespace WindowForm
{
public class Form1 : System.Windows.Forms.Form
{
private System.ComponentModel.IContainer components = null;
public Form1(int xSize, int ySize)
{
InitializeComponent(xSize, ySize);
}
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent(int xSize, int ySize)
{
components = new System.ComponentModel.Container();
this.Size = new System.Drawing.Size(xSize, ySize);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
}
}
can you help me?, thanks very much
Erwin
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page