I Want add images to my dataGridView columns, but i cant find the way to reference my image, or .ico inside of my project.
how i do this reference to inside the project, the path. I want generate my dll with my images.
Example:
private void createGraphicsColumn()
{
Icon treeIcon = new Icon(this.GetType(), “????????”); // this dude
DataGridViewImageColumn iconColumn = new DataGridViewImageColumn();
iconColumn.Image = treeIcon.ToBitmap();
iconColumn.Name = “Tree”;
iconColumn.HeaderText = “Nice tree”;
dataGridView1.Columns.Insert(2, iconColumn);
}
i tried a Directory.GetCurrentDirectory(), but they only catch the global path of the desktop. i want reference my project, without pass thrgouth the windows path.