0
這個問題困擾了我一段時間 - 當試圖向下滾動面板時,欄將不會移動,直到釋放鼠標(在其他控件中似乎沒有問題)。Winforms面板和滾動條問題
在本次論壇http://csharpcode25.appspot.com/question/5080f1624f1eba38a4ca86bf用戶已經經歷了同樣的問題,一個可能的解決方案是通過覆蓋WndProc中給出 - 不知道如果事情得到迷失東京從C#到VB,但它只是拋出號碼有誤,參數類型‘’是'System.IntPtr',它不是數字。'在第一行。有任何想法嗎?
感謝
Public Class Panelx
Inherits Panel
Private Const WM_HSCROLL As Integer = &H114
Private Const WM_VSCROLL As Integer = &H115
Protected Overrides Sub WndProc(ByRef m As Message)
Try
If (m.Msg = WM_HSCROLL OrElse m.Msg = WM_VSCROLL) AndAlso ((CInt(Fix(m.WParam)) And &HFFFF) = 5) Then
' Change SB_THUMBTRACK to SB_THUMBPOSITION
m.WParam = CType((CInt(Fix(m.WParam)) And (Not &HFFFF)) Or 4, IntPtr)
End If
MyBase.WndProc(m)
Catch ex As Exception
EmailError(ex)
End Try
End Sub
End Class
嘿Carko - 高興有人是清醒的 - 太感謝你了,這個問題已經竊聽我的sooooooooo長:-) – gchq 2013-04-27 23:01:33