Python, C#, Visual Studio

Good day,

I have a ready developed application in Visual Studio, Windows Forms Application. I used C# and MSSQL in order to draw graphs. The graphs are of a very low quality. I have decided to use Python and Matplotlib to draw graphs of a better quality.

In Visual Studio it is possible to create a Windows Forms Application (already created), as well as a Python Application (I will still create this to draw the graphs with). I have managed to at lease develop a simple Python Application that can execute. I have also put both applications/projects in one solution. I can’t however find a way to call the Python project from within the Windows Forms Application. The Python Application reference can’t be added to Windows Forms Application, and I can’t “see” the Python Application in any way, although both projects are in one solution.

Please help me to call/reference/execute a Python Application from a Windows Forms Application.

Help would be much appreciated.
Regards,
Vivien

1 Like

I suspect the main issue is interoperability between the .NET framework and Python. For that, I would suggest looking into the following package: https://pythonnet.github.io/.

Note that I personally have minimal experience with using Windows Forms in general, and have yet to try executing any type of Python code within a Windows Forms application. But the above link is the first place I’d look (if you haven’t already).

1 Like

Good day,

Thank you very much, I will have a look at the link. I have seen it, but haven’t looked at it yet.

Thanks again,
Vivien

1 Like