Deaktivieren des Neuzeichnens eines Steuerelements
Deaktivieren des Neuzeichnens eines Steuerelements <URL:http://dotnet.mvps.org/dotnet/faqs/?id=disableredrawing&lang=de> ---------------------------------------------------------------------------- Preventing controls from redrawing Disable redrawing of a control: \\\ Private Declare Auto Function SendMessage Lib "user32.dll" ( _ ByVal hWnd As IntPtr, _ ByVal wMsg As Int32, _ ByVal wParam As IntPtr, _ ByVal lParam As IntPtr _ ) As IntPtr Private Const WM_SETREDRAW As Int32 = &HB . . . With Me.RichTextBox1 SendMessage( _ .Handle, WM_SETREDRAW, New IntPtr(CInt(False)), IntPtr.Zero _ ) ' Manipulate contents. For i As Integer = 0 To .TextLength .SelectionStart = i .SelectionLength = 1 .SelectionColor = Color.Red .SelectionFont = New Font(.SelectionFont, FontStyle.Bold) Next i SendMessage( _ .Handle, WM_SETREDRAW, New IntPtr(CInt(True)), IntPtr.Zero _ ) .Refresh() End With ///