I have made an ownerdrawn tooltip showing 4 images just below the mouse location. I have tooltip for every product, and there can be many products on the screen. My problem is that if I select a product to the right of the form, then I will not
be able to see the tooltip as it is out of bounds. I can find a location, but how can I draw the tooltip from a certain location to the left instead of drawing it to the right??
Here is my code.
void imageToolTip_Popup(object sender, PopupEventArgs e)
e.ToolTipSize = new Size(itemImage.Width * 2, itemImage.Height * 2);
void imageToolTip_Draw(object sender, DrawToolTipEventArgs e)
var rectAll = new Rectangle(0, 0, itemImage.Width * 4, itemImage.Height * 4);
for (int count = 0; count < imageList1.Images.Count; count++) //
Image image = imageList1.Images[count];
if (count == 0)
var rect0 = new Rectangle(0, 0, itemImage.Width, itemImage.Height);
if (count == 1)
var rect1 = new Rectangle(0, itemImage.Width, itemImage.Width, itemImage.Height);
if (count == 2)
var rect2 = new Rectangle(itemImage
View Complete Post