将 RenderWindowControl 添加到工具箱 [英] Adding RenderWindowControl to tool box

查看:37
本文介绍了将 RenderWindowControl 添加到工具箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Kitware ActiViz.NET.我已经使用nuget安装了它.但我似乎无法在工具箱上找到 RenderWindowControl.我一直在尝试以这种方式手动添加它:

I am trying to use Kitware ActiViz.NET. I have installed it using nuget. But I can't seem to find RenderWindowControl on the toolbox. I have been trying to add it manually this way:

  • 调用选择项目..."

  • invoke "Choose Items..."

然后在下面的对话框中点击按钮浏览...",

and in the following dialog click on button "Browse...",

导航到您的 ActiViz.NET 安装文件夹,浏览到/bin文件夹,选择Kitware.VTK.dll".

navigate to your ActiViz.NET installation folder, browse to /bin folder, select "Kitware.VTK.dll".

点击确定.

现在您应该在工具箱中看到一个名为 RenderWindowControl 的新控件.但我得到文件C:\programfiles\activiz.net 5.8.0 Opensource Eddition\bin\kitware.vtk.DLL"无效".

Now you should see in your ToolBox a new control named RenderWindowControl. But I get "The file "C:\programfiles\activiz.net 5.8.0 Opensource Eddition\bin\kitware.vtk.DLL" is not valid".

我试图在代码中添加控件而不是设计器,但得到了这个异常:无法加载文件或程序集Kitware.VTK,版本=5.8.0.607,文化=中性,PublicKeyToken=995c7fb9db2c1b44"或其依赖项之一.试图加载格式不正确的程序.

I have tried to add the control in the code rether than the designer,and got this exception: Could not load file or assembly 'Kitware.VTK, Version=5.8.0.607, Culture=neutral, PublicKeyToken=995c7fb9db2c1b44' or one of its dependencies. An attempt was made to load a program with an incorrect format.

有人遇到过这个问题吗?有什么想法吗?

Has anyone had this problem before? Any ideas?

推荐答案

对于设计模式,您需要使用 32Bit 版本,因为 VS 在 32Bit 上运行并且只能加载 32Bit 控件.因此,您可以在设计时使用 32 位版本,并将构建/发布切换到 64 位版本.

For the design mode you would need to use the 32Bit version, because VS is running on 32Bit and can only load 32Bit controls. So you could use for design time the 32Bit version and for build/release switch to the 64bit version.

但您也可以手动添加RenderWindowControl.当然,设计师将无法显示这个,所以它会有必要注释掉,然后再切换到设计器

But you can also add the RenderWindowControl manually. Of course the designer will be unable to display this, so it would be necessary to comment it out, before switching to the designer

打开您的设计器文件,例如Form1.Designer.cs 并添加控件如

Open your designer file e.g. Form1.Designer.cs and add the control like

private RenderWindowControl myRenderWindowControl;

private void InitalizeComponent()
{
    //all other controls added by the designer

    myRenderWindowControl = new RenderWindowControl();
    myRenderWindowControl.SetBounds(0,0,640,480);
    this.Controls.Add(this.myRenderWindowControl);
}

这篇关于将 RenderWindowControl 添加到工具箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆