Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Get Image from Resource for Create Addin ArcGis
WhatsApp
Yogesh Sharma
Oct 03
2015
1.7
k
0
0
Add reference using ESRI.ArcGIS.ADF.Local and stdole.
public
IPictureMarkerSymbol CreateMarker() {
IRgbColor color =
new
RgbColor();
color.Red = 255;
color.Green = 255;
color.Blue = 255;
// Create the EMF Marker and assign properties.
// Create the Bitmap Marker and assign properties.
IPictureMarkerSymbol bmpMarkerSymbol =
new
PictureMarkerSymbol();
Bitmap bitmap = Properties.Resources.Exit;
// IPictureMarkerSymbol markerSymbol = new PictureMarkerSymbol();
bmpMarkerSymbol.Picture = ESRI.ArcGIS.ADF.COMSupport.OLE.GetIPictureDispFromBitmap(bitmap)
as
stdole.IPictureDisp;
//bmpMarkerSymbol.CreateMarkerSymbolFromFile(esriIPictureType.esriIPictureBitmap, "C:\\temp\\Exit.bmp");
bmpMarkerSymbol.Angle = 0;
bmpMarkerSymbol.Color = color;
//.setBitmapTransparencyColor(color);
bmpMarkerSymbol.Size = 32;
//.setSize(32);
bmpMarkerSymbol.XOffset = 0;
//.setXOffset(0);
bmpMarkerSymbol.YOffset = 0;
//.setYOffset(0);
return
bmpMarkerSymbol;
}
ArcGis
ArcObject
Create Addin ArcGis