Giter Club home page Giter Club logo

Comments (4)

mikeoliphant avatar mikeoliphant commented on June 8, 2024 1

Have a look at how SharpSoundDevice (a C# VST2 solution I used to use before I wrote AudioPlugSharp) does it:

https://github.com/ValdemarOrn/SharpSoundDevice/blob/aed15cbb5937838028cf85b3e252fc12309ed9be/SharpSoundDevice/DeviceUtilities.cs

In particular:

		public static void DockWinFormsPanel(System.Windows.Forms.Control panel, IntPtr vstWindow)
		{
			System.Windows.Forms.Application.EnableVisualStyles();

			panel.Top = 0;
			panel.Left = 0;

			SetParent(panel.Handle, vstWindow);
		}

It should be as simple as that to link up a Window Forms control with the parent window handle from the VST.

from audioplugsharp.

mikeoliphant avatar mikeoliphant commented on June 8, 2024

I have not tried to get it to work in MacOS. I suspect there would be two issues. First, AudioPlugSharp uses C++/CLR for bootstrapping the managed code. This is Windows-only, so a different solution would be required for MacOS. Second, a different UI integration would be required.

As for WinForms, I do not have an example, but it should be relatively easy to do. You would need to create a WinForms context from the window pointer the VST host passes instead of a WPF context.

from audioplugsharp.

ThibaudMZN avatar ThibaudMZN commented on June 8, 2024

I was suspicious about the UI integration indeed, but didn't know about C++/CLR, thanks for the clarification !

All right, thanks then, I'll try to make a simple working example in WinForms !

from audioplugsharp.

ThibaudMZN avatar ThibaudMZN commented on June 8, 2024

Ah thanks that's a great example !

from audioplugsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.