This topic assumes you have a toolbar button created. To add an image to your toolbar button in code, complete the following steps:
Locate the command in your source file that you want to add an image to.
Enter the following code to add an image to your toolbar button:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
cNew.Image = System.Drawing.Image.FromFile("C:\bitmap\New.bmp") |
To write code in C#
C# |
Copy Code
|
---|---|
cNew.Image = System.Drawing.Image.FromFile("C:\\bitmap\\New.bmp"); |