aspx中的.Handle(C#中的桌面应用程序)与C#的等价物是什么(Visual Studio 2010)

aspx中的.Handle(C#中的桌面应用程序)与C#的等价物是什么(Visual Studio 2010),c#,asp.net,visual-studio-2010,handle,C#,Asp.net,Visual Studio 2010,Handle,我正在使用Ventana系统为Vensim软件提供的示例。该示例是C#中的一个桌面应用程序。我想把这个例子用C#实现一个web版本 桌面版 VensimDLLWrapper.vensim_show_sketch(1, 1, 100, (long)pictureBox_Sketch.Handle); 网络版 VensimDLLWrapper.vensim_show_sketch(1, 1, 100, (long)Image1.???); 这是我的方法:我在桌面应用程序中创建一个类似Pictur

我正在使用Ventana系统为Vensim软件提供的示例。该示例是C#中的一个桌面应用程序。我想把这个例子用C#实现一个web版本

桌面版

VensimDLLWrapper.vensim_show_sketch(1, 1, 100, (long)pictureBox_Sketch.Handle);
网络版

VensimDLLWrapper.vensim_show_sketch(1, 1, 100, (long)Image1.???);

这是我的方法:我在桌面应用程序中创建一个类似PictureBox的应用程序

        PictureBox pictureBox_Sketch = new PictureBox();
        pictureBox_Sketch.Name = "pictureBox_Sketch";
        pictureBox_Sketch.Size = new System.Drawing.Size(1200, 768);
        pictureBox_Sketch.TabIndex = 19;
        pictureBox_Sketch.TabStop = false;
然后,我把图像放在手柄上

       VensimDLLWrapper.vensim_show_sketch(1, 1, 100, (long)pictureBox_Sketch.Handle);
然后,我将图像复制到剪贴板:

       VensimDLLWrapper.vensim_tool_command("EXPORT>SK", (long)pictureBox_Sketch.Handle, 0);
最后,我将映像保存在磁盘中(很明显,我必须使用Server.Map或其他)


ASP.NET中没有句柄之类的东西,请尝试探索Image类,此链接可能会有所帮助。研究如何在ASP.NET中实现动态图像。这个问题基本上是这个主题的重复。好的,我们的想法是使用一个像桌面应用程序这样的组件来使用句柄。。。
   if (PInvoke.OpenClipboard(pictureBox_Sketch.Handle))
        {
            if (PInvoke.IsClipboardFormatAvailable(14))
            {
                IntPtr ptr = PInvoke.GetClipboardData(14);
                if (!ptr.Equals(new IntPtr(0)))
                {
                    Metafile metafile = new Metafile(ptr, true);
                    metafile.Save("C:\\ruta\\Images\\ModelGraph.png", System.Drawing.Imaging.ImageFormat.Png);
                    //HyperLink1.NavigateUrl = "Images\\ModelGraph.png";
                    // Image1.ImageUrl = "Images\\ModelGraph.emf";

                    //Set the Image Property of PictureBox 

                }
            }
            PInvoke.CloseClipboard();
        }