English 中文(简体)
变化 另一种形式的控制图
原标题:Changing Image from a control in another form
  • 时间:2012-05-17 20:10:30
  •  标签:
  • c#

我的主要互动形式是我的大多数互动。 我的另一种形式是,它只是一个好兆头。 当我点上表1的塔顿时,我要显示我已经可以采取的第二种方式。 然而,我正在从表格1中找到图象。 我的法典

public Image picboximage {

        get { return pictureBox23.Image; }
        set { picboximage = value; }
    }


//in form 1

    Form2 otherform = new Form2();


    therform.picboximage = Image.FromStream(lxFS);

然而,这给我带来了对流 the的排泄。

set { picboximage = value; }

Any ideas?

感谢

最佳回答

在你们的“金箱”财产中,你重新确定了错误的财产。 实际上,你把“set头” calling倒,直到呼吁的支流(这就是为什么你重新获得例外。

Try this:

public Image picboximage 
{
    get { return pictureBox23.Image; }
    set { pictureBox23.Image = value; }
}
问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签