Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27196

Mouse Wheel Scrolling inside a textbox

$
0
0
Hello everyone,

I am semi new to programming and so far I am self teaching my self some stuff.

One of the questions I have is about a problem I am running into.

I have a basic form and its set up to look almost like a registration form. All labels and textboxes, and the form has a vertical scroll bar.

The Issue I am having is one of the text boxes is multiline and has a vertical scroll attached to it.
When I click inside (or tab into it) I can type and it works fine but when I go to scroll with my mouse wheel it will only the scroll bar inside the the text box.

Basically I want the mouse wheel to scroll the scroll bar inside the text box only when the mouse is hovering over it.
Exactly as if it were HTML.

If I click into the text box (or tab into it) and type I want to still be able to scroll the form while still being able to type in the text box.

atm I have a messy work around
Code:

    Private Sub Form1_onCLick(ByVal sender As Object, ByVal _
    e As System.EventArgs) Handles Me.Click

        Me.Focus()

    End Sub

So when I click the form it takes the focus out of the text box and I can scroll the form like normal with the mouse wheel.

But like I said when do it that way I cant type in the text box anymore as it loses focus

Viewing all articles
Browse latest Browse all 27196

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>