I have a calendar control derived from DataGridView. A custom item hover event is already in place. When handling the event, I have the item that was hovered and the mouse location. What is the best method to show a pop-up window with detailed information about the item? Should I use a stripped down form (no titlebar,controlbox, etc) and simply close it on the MouseLeave? Is there a better way?
Thanks!
Any type of Control, a Panel, a UserControl, etc. These will do as long as they doesn’t have to pop outside the current form. If it needs to pop outside you might need to use a Form as you stated and removes it’s border.
Pre create the Control or Form in the main form, then when the mouse hover the needed control, make the pop control visible, and when the mouse leaves, make it invisible.
Just watch out for the mouse events though, they could get caught by the newly poped control. This might require a little positioning gymnastic as you will have to offset the position so that the cursor never gets to hover the poped control.
Take example on Microsoft Windows tooltip.