Comments

RedyM wrote on 3/25/2022, 8:20 PM

Also, if it's possible, how do I make it work? Here's the code I'm currently using ( which doesn't work. When I launch it in Vegas it's all empty )

EDIT: the forum kinda messed up the indentation of the code, sorry!

using System;
using System.Collections;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using ScriptPortal.Vegas;namespace GENameSpace
{
    public class GEDockControlClass : DockableControl
    {
        private GENameSpace.UserControl1 myform = null;        public GEDockControlClass() : base("GEInternal")
        {
            this.DisplayName = "GE";
        }        public override DockWindowStyle DefaultDockWindowStyle
        {
            get { return DockWindowStyle.Docked; }
        }        public override Size DefaultFloatingSize
        {
            get { return new Size(500, 500); }
        }        protected override void OnLoad(EventArgs args)
        {
            myform = new UserControl1();
        }        protected override void OnClosed(EventArgs args)
        {
            base.OnClosed(args);
        }
    }
}public class GEM : ICustomCommandModule
{
    public Vegas myVegas = null;
    CustomCommand GEVar = new CustomCommand(CommandCategory.View, "GE");    public void InitializeModule(Vegas vegas)
    {
        myVegas = vegas;        GEVar.MenuItemName = "GE";
    }    public ICollection GetCustomCommands()
    {
        GEVar.MenuPopup += this.HandlePICmdMenuPopup;
        GEVar.Invoked += this.HandlePICmdInvoked;
        CustomCommand[] cmds = new CustomCommand[] { GEVar };
        return cmds;
    }    void HandlePICmdMenuPopup(Object sender, EventArgs args)
    {
        GEVar.Checked = myVegas.FindDockView("GEInternal");
    }    void HandlePICmdInvoked(Object sender, EventArgs args)
    {
        if (!myVegas.ActivateDockView("GEInternal"))
        {
            GENameSpace.GEDockControlClass GEMDock = new GENameSpace.GEDockControlClass();
            GEMDock.AutoLoadCommand = GEVar;
            GEMDock.PersistDockWindowState = true;
            myVegas.LoadDockView(GEMDock);
        }
    }
}

 

jetdv wrote on 3/26/2022, 8:00 AM

You may get the same answer as the last time this was asked:

https://www.vegascreativesoftware.info/us/forum/can-i-use-wpf-uwp-in-script-instead-of-winform--132533/