C# PictureBox未以表格C显示#

C# PictureBox未以表格C显示#,c#,controls,C#,Controls,我有以下代码: foto = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)(foto)).BeginInit(); foto.BackgroundImage = global::Catalogo_Digital.Properties.Resources.voltar; foto.BackgroundImageLayout = System.Win

我有以下代码:

    foto = new System.Windows.Forms.PictureBox();
    ((System.ComponentModel.ISupportInitialize)(foto)).BeginInit();
    foto.BackgroundImage = global::Catalogo_Digital.Properties.Resources.voltar;
    foto.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
    foto.Location = new System.Drawing.Point(85, 85);
    foto.Name = "foto";
    foto.Size = new System.Drawing.Size(1000, 800);
    foto.TabIndex = 0;
    foto.TabStop = false;
internal System.Windows.Forms.PictureBox foto;

问题是,当我调试它时,这个名为“foto”的picturebox没有显示,它只是不可见,我不知道。我只是想创建一个“内部”或“公共”的picturebox,而不使用设计器模式,只使用代码。

这是一个非常随机的代码片段。它真的缺少EndInit()和这个.Controls.Add(foto)吗?谢谢。代码缺少此.Controls.Add(foto);。我刚刚添加了它,现在正在显示它,谢谢。