Post #4 stirred my brain, as I had already had running code using the MouseMove in and around an image control but had not yet thought of how to get rid of the flicker. I was experimenting with a super-imposed empty image control where its MouseMove event would switch the images but the form's header section real-estate is quite congested with other controls so that approach didn't work very well and I discarded the empty image control. Anyway, I resized whatever controls I could so as much open space as could be made available would allow the header-section's MouseMove event to "test" the picture property and change as necessary.
Here's how it all shakes out. The user clicks on any one of the column headings to sort the listing. With that binary function the sort reverses accordingly..... nothing new here. If the user holds down the Ctrl key and clicks on a column heading the search window is made visible and its "Left" position adjusted to match that of the column heading. The normal transparency level of the "red & white Close" toggles with image changes as the mouse moves about in the header section.
Code:
Private Sub FormHeader_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
' Change image control picture to the lighter transparency picture as needed.
'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
If Me.imSearchClose.Picture <> IPPath & "\imCloseLite.jpg" Then _
Me.imSearchClose.Picture = IPPath & "\imCloseLite.jpg"
End Sub
Private Sub imSearchClose_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
' Mouse is hovering over the "Close" control. Show reduced transparency as needed.
'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
If Me.imSearchClose.Picture <> IPPath & "\imClose.jpg" Then _
Me.imSearchClose.Picture = IPPath & "\imClose.jpg"
End Sub
As always, thanks to all,
Bill