Page 1 of 2

Using C# (and .NET) from FWH

Posted: Tue Jun 26, 2018 4:58 pm
by Antonio Linares
We have done a major advance on using C# (or any other .NET based language) from FWH :-)

This is going to be part of FWH 18.05

For now, please start testing this:

1. How to build a C# DLL:

test.cs

Code: Select all

using System.Windows.Forms;

namespace dllNamespace
{
    public class dllClass
    {
        public static int ShowMsg( string msg )
        {
            MessageBox.Show( msg );
            return 0;
        }
   }
}
To build it as a DLL do this:
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
csc /out:test.dll /target:library test.cs

Next: I will explain you how to run it from FWH 18.05 ;-)

Re: Using C# (and .NET) from FWH

Posted: Tue Jun 26, 2018 6:46 pm
by MFarias
Show, thats fantastic !!!!! \o/

Re: Using C# (and .NET) from FWH

Posted: Tue Jun 26, 2018 7:42 pm
by TimStone
Antonio,

As you advance with this, perhaps you can keep in mind how we might turn a FWH program into a service. We've discussed this before, but never came to the point of an actual working service that can run in the background. We got builds, but it would not actually run. Maybe with this new technology we can actually accomplish that goal.

Tim

Re: Using C# (and .NET) from FWH

Posted: Wed Jun 27, 2018 1:39 pm
by Antonio Linares
This is already working :-)

dotnet.prg

Code: Select all

#include "FiveWin.ch"

function Main()

   FW_DotNet( "test.dll", "dllNamespace.dllClass", "ShowMsg", "C# from FWH" )

   FW_DotNet( "test.dll", "dllNamespace.dllClass", "ShowMsg", "yes!!!" )

return nil

Re: Using C# (and .NET) from FWH

Posted: Wed Jun 27, 2018 2:05 pm
by Antonio Linares
.

Re: Using C# (and .NET) from FWH

Posted: Wed Jun 27, 2018 2:15 pm
by Antonio Linares
.

Re: Using C# (and .NET) from FWH

Posted: Wed Jun 27, 2018 3:14 pm
by Adolfo
Nice...
I will follow this topic, since I drop some developments because I couldn't access some .NET dll's and Libs

Greetins
From Chile
Adolfo

Re: Using C# (and .NET) from FWH

Posted: Thu Jun 28, 2018 12:56 pm
by toninhofwi
fantastic job, a big door is open now !

thank you.

Re: Using C# (and .NET) from FWH

Posted: Thu Jun 28, 2018 1:10 pm
by vilian
It's really great!

Re: Using C# (and .NET) from FWH

Posted: Thu Jun 28, 2018 5:24 pm
by Antonio Linares
We are building a CLASS TDotNet ;-)

To be included in FWH 18.05

Re: Using C# (and .NET) from FWH

Posted: Fri Jun 29, 2018 10:58 am
by Marc Venken
Aha, Closer to my arduino then :wink:

Re: Using C# (and .NET) from FWH

Posted: Thu Jul 19, 2018 2:14 pm
by vilian
Antônio,
Is it not ready yet ?
I thought would be included in FWH 18.05 :(

Re: Using C# (and .NET) from FWH

Posted: Fri Jul 20, 2018 5:58 am
by Antonio Linares
Vilian,

Class TDotNet is already included in FWH 18.05 :-)

Please go to FWH\samples and do:

buildh.bat dotnet

Re: Using C# (and .NET) from FWH

Posted: Fri Jul 20, 2018 6:52 pm
by miragerr
Hello, friends

is it possible to use the FAST-REPORT.NET in this case?

I'm hanging on

Re: Using C# (and .NET) from FWH

Posted: Fri Aug 03, 2018 8:07 pm
by cnavarro
miragerr wrote:Hello, friends

is it possible to use the FAST-REPORT.NET in this case?

I'm hanging on
Please
Send me or put a sample of how you are using the DLL now