Sesama Sesame
Sesama Sesame

Reputation: 279

usercontrol image windows form

How can I create an image icon used once I Choose Items in Tool properties to add my defined control dll into my application ? I need some code or hint to look into. Aany help ? [I also have a thread here https://stackoverflow.com/questions/8074943/clipmate-s-similar-function noone answers and not so many people care to view]

Upvotes: 0

Views: 550

Answers (1)

FelisCatus
FelisCatus

Reputation: 5334

Add the icon as a resource in the project. Then, use the ToolboxBitmapAttribute to locate it.

Try this:

[ToolboxBitmap(typeof(MineGame))]
public partial class MineGame : UserControl
{
    //....
}

Visual Studio will try to find the icon in the assembly which contains MineGame.

Upvotes: 1

Related Questions