Forum Discussion
YMinaev
Staff
14 years agoHi,
You need to calculate coordinates within your ribbon control and then click the ribbon on them:
You need to calculate coordinates within your ribbon control and then click the ribbon on them:
var ribbon = // obtain the ribbon control
var ribbonPic = ribbon.Picture();
var buttonPic = Utils.Picture;
buttonPic.LoadFromFile("c:\\my_image.bmp");
var rect = ribbonPic.Find(buttonPic);
ribbon.Click((rect.Left + rect.Right) / 2, (rect.Top + rect.Bottom) / 2);