So I have this form containing multiple images for user selection. The images are shrunk down to enable the user a quick overview of the types of images. What I want to achieve is - when the end user hovers over any of these images/frames - a modeless userform will pop up displaying a much larger version of the same image.
This alone would be challenging enough but there are some other points I want to look at:
- The popup form must be modeless. If the user moves the mouse away on the original form, the popup form must close. = PARTLY WORKING (DOUBT THIS CAN BE FULLY IMPLEMENTED). I initially tried measuring the mouse pointer in relation to the form but it had a lot of problems. So I was forced to call a sub from the mouse hover function of each control. The problem I have found is that the mouse hover function only works if the control is uppermost. Meaning if the popup form covers the control on the original form, the mouse movement is only read from the 2nd form not the 1st. Am chalking it up to a VBA technical limitation and moving on.
- If the user closes the original form, the popup form must close also. = PARTLY WORKING. I feel as though I am repeating code unnecessarily. I would like a single exit point but am not sure where this would go. Also sometimes the popup gets stuck but that
is an issue with objective 4.- The original form has dynamic size/positioning of images/frames. Not sure how this will play out with the 'mouse hover over image' code? = PARTLY WORKING. The popup matches the aspect ratio of the original image but I would like it to resize to most of the desktop area. I need to merge the 'resize form based on picture' concept from an earlier form (frmShowPicture) with the 'almost fill desktop area' concept used in frmShow10Pictures.
- Optional but nice to have - the pop up form should auto close after X seconds. = PARTLY WORKING. Occasionally the popup form insists on finishing its loop even after it has received the instruction to exit. I don't know why. Thinking I should open a separate thread to tackle this particular side issue.
I don't expect to achieve all of these at the first attempt. But help on any of these aspects would be appreciated.
Bookmarks