Catch Every TabStrip Click Event

Catch Every TabStrip Click Event

You might have noticed that if you click on a TabStrip tab, then move the mouse pointer until it’s no longer over the TabStrip without releasing the mouse button, the Click event doesn’t fire even though the tab is changed. To detect this behavior, use this code:

 Private Sub TabStrip1_MouseUp(Button As Integer, _	Shift As Integer, X As Single, Y As Single)	If X < 0 Or X > TabStrip1.Width Or _		Y < 0 Or Y > TabStrip1.Height Then 			TabStrip1_Click	End IfEnd Sub

This calls the Click event code if you do not release the mouse button above the TabStrip. You can’t just put the Click handling code in the MouseUp event because then keyboard tab changes wouldn’t work.

See also  What Are International Payments, And How Do They Work?

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist