Private multiSelected As Boolean
Private _handlers As New System.ComponentModel.EventHandlerList()
- Custom Event Scrolled As System.EventHandler
- AddHandler(ByVal value As System.EventHandler)
- Me._handlers.AddHandler("Scrolled", value)
- End AddHandler
-
- RemoveHandler(ByVal value As System.EventHandler)
- Me._handlers.RemoveHandler("Scrolled", value)
- End RemoveHandler
-
- RaiseEvent(ByVal sender As Object, ByVal e As System.EventArgs)
- Dim value As System.Delegate = Me._handlers("Scrolled")
- Dim handler As System.EventHandler = DirectCast(value, System.EventHandler)
- handler.Invoke(Me, e)
- End RaiseEvent
- End Event
+ Public Event Scrolled As System.EventHandler
Public Sub New()
View = Windows.Forms.View.Details
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Const WM_ERASEBKGND As Integer = &H14
Const WM_PAINT As Integer = &HF
+ Const WM_HSCROLL As Integer = &H114
+ Const WM_VSCROLL As Integer = &H115
+
+ Select Case m.Msg
+ Case WM_ERASEBKGND
+ If Me.changeBounds <> Rectangle.Empty Then
+ m.Msg = 0
+ End If
+ Case WM_PAINT
+ If Me.changeBounds <> Rectangle.Empty Then
+ Win32Api.ValidateRect(Me.Handle, IntPtr.Zero)
+ Me.Invalidate(Me.changeBounds)
+ Me.changeBounds = Rectangle.Empty
+ End If
+ Case WM_HSCROLL, WM_VSCROLL
+ RaiseEvent Scrolled(Me, EventArgs.Empty)
+ End Select
- If m.Msg = WM_ERASEBKGND Then
- If Me.changeBounds <> Rectangle.Empty Then
- m.Msg = 0
- End If
- End If
- If m.Msg = WM_PAINT Then
- If Me.changeBounds <> Rectangle.Empty Then
- Win32Api.ValidateRect(Me.Handle, IntPtr.Zero)
- Me.Invalidate(Me.changeBounds)
- Me.changeBounds = Rectangle.Empty
- End If
- End If
Try
MyBase.WndProc(m)
Catch ex As ArgumentOutOfRangeException
AddHandler _listCustom.CacheVirtualItems, AddressOf MyList_CacheVirtualItems
AddHandler _listCustom.RetrieveVirtualItem, AddressOf MyList_RetrieveVirtualItem
AddHandler _listCustom.DrawSubItem, AddressOf MyList_DrawSubItem
+ AddHandler _listCustom.Scrolled, AddressOf MyList_Scrolled
InitColumnText()
_colHd1.Text = ColumnText(0)
RemoveHandler _listCustom.CacheVirtualItems, AddressOf MyList_CacheVirtualItems
RemoveHandler _listCustom.RetrieveVirtualItem, AddressOf MyList_RetrieveVirtualItem
RemoveHandler _listCustom.DrawSubItem, AddressOf MyList_DrawSubItem
+ RemoveHandler _listCustom.Scrolled, AddressOf MyList_Scrolled
TabDialog.RemoveTab(TabName)
'End If
End Sub
+ Private Sub MyList_Scrolled(ByVal sender As Object, ByVal e As EventArgs)
+ Dim listView As DetailsListView = DirectCast(sender, DetailsListView)
+ listView.Refresh()
+ End Sub
+
Public Function WebBrowser_GetSelectionText(ByRef ComponentInstance As WebBrowser) As String
'発言詳細で「選択文字列をコピー」を行う
'WebBrowserコンポーネントのインスタンスを渡す