I am wondering if anyone has encountered this issue and can shed some light on it.
VS1015, .net 4.0, .net 4.5 and .net 4.6
I have a panel with a number of controls that are all programmatically added. The controls consist of labels, picture boxes, buttons and rich textboxes. The number of the controls added can vary.
When I mouse over any of the controls on the panel I can scroll the panel with the mouse wheel, all except for mouse-over the rich textboxes. The events fire when the mouse enters and leaves the rich textboxes but the mouse wheel has no effect.
This code and the scrolling function did and still does work perfectly under Windows 7 however, on machines that have been upgraded to W10, it does not.
Add RtxtBox example
Dim AddTxtBoxEpDesc As RichTextBox
AddTxtBoxEpDesc = New RichTextBox
With AddTxtBoxEpDesc
.Name = txtE
.Size = New Drawing.Size(445, Args.hgtTxtOverview)
.Location = New Point(212, thisEpisodeStartPos + Args.posPic - Math.Abs(myPanel.AutoScrollPosition.Y))
.Multiline = True
.WordWrap = True
.BackColor = Color.MintCream
.BorderStyle = BorderStyle.None
.Font = New Font("arial", 8, FontStyle.Regular)
.Text = Args.Overview + Environment.NewLine + Environment.NewLine
.ScrollBars = RichTextBoxScrollBars.None
.Visible = True
End With
AddHandler AddTxtBoxEpDesc.MouseEnter, AddressOf myPanel1_MouseEnter
AddHandler AddTxtBoxEpDesc.MouseLeave, AddressOf myPanel1_MouseLeave
myPanel.Controls.Add(AddTxtBoxEpDesc)
The events.
Private Sub myPanel1_MouseEnter(ByVal sender As System.Object, ByVal e As EventArgs)
Dim myControl0 As Control = Me.Controls.Item("myPanel1")
myControl0.Focus()
End Sub
Private Sub myPanel1_MouseLeave(sender As Object, e As EventArgs)
Me.ActiveControl = Nothing
End Sub
Any ideas??
What I have tried:
I have tried and still using the code above.