Dear Sir,
I have an error "Failed to create component error "System.Resources.MissingManifestResourceException"
The problem is in the line code below :
base.Image = (System.Drawing.Image)componentResourceManager.GetObject("this.Image");
Please guide me to load images from Resource
Please provide answers in C# and vb.net
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CustomcontrolPictureBox
{
[DebuggerStepThrough]
[DefaultEvent("Click")]
[ProvideProperty("ImageTest", typeof(Control))]
public class ImageTest : PictureBox
{
private IContainer components = null;
public ImageTest()
{
this.InitializeComponent();
}
protected override void Dispose(bool disposing)
{
if ((!disposing ? false : this.components != null))
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(ImageTest));
((ISupportInitialize)this).BeginInit();
base.SuspendLayout();
base.Image = (System.Drawing.Image)componentResourceManager.GetObject("this.Image");
base.Size = new System.Drawing.Size(71, 71);
base.SizeMode = PictureBoxSizeMode.Zoom;
((ISupportInitialize)this).EndInit();
base.ResumeLayout(false);
}
}
}