Click here to Skip to main content
15,912,756 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can I access objects in a ListArray directly? Pin
PIEBALDconsult22-Sep-07 17:21
mvePIEBALDconsult22-Sep-07 17:21 
GeneralRe: How can I access objects in a ListArray directly? Pin
JoeRip22-Sep-07 17:25
JoeRip22-Sep-07 17:25 
GeneralRe: How can I access objects in a ListArray directly? Pin
Ravi Bhavnani22-Sep-07 18:16
professionalRavi Bhavnani22-Sep-07 18:16 
GeneralRe: How can I access objects in a ListArray directly? Pin
PIEBALDconsult23-Sep-07 4:38
mvePIEBALDconsult23-Sep-07 4:38 
QuestionRTB Redraw problem Pin
IceWater4222-Sep-07 11:06
IceWater4222-Sep-07 11:06 
AnswerRe: RTB Redraw problem Pin
MoustafaS22-Sep-07 11:41
MoustafaS22-Sep-07 11:41 
GeneralRe: RTB Redraw problem Pin
IceWater4222-Sep-07 14:08
IceWater4222-Sep-07 14:08 
AnswerRe: RTB Redraw problem Pin
Abisodun22-Sep-07 13:53
Abisodun22-Sep-07 13:53 
I don't recall where I found this but it should solve both of you problems:

Private Const WM_SETREDRAW As Integer = &HB
Private Const WM_USER As Integer = &H400
Private Const EM_GETEVENTMASK As Integer = (WM_USER + 59)
Private Const EM_SETEVENTMASK As Integer = (WM_USER + 69)

Private Declare Auto Function SendMessage Lib "user32.dll" ( _
ByVal hWnd As IntPtr, _
ByVal msg As Integer, _
ByVal wParam As Integer, _
ByVal lParam As IntPtr) As IntPtr


' We want to suspend redrawing because we need to select each
' character in turn to determine its fonts. However, RichTextBox
' appears to be missing some properties to do this, so use API:

' Stops RichText redrawing:
richTextBox1.SuspendLayout()
SendMessage(richTextBox1.Handle, WM_SETREDRAW, 0, IntPtr.Zero)

' Stops RichText sending any events:
Dim eventMask As IntPtr = SendMessage( _
richTextBox1.Handle, EM_GETEVENTMASK, 0, IntPtr.Zero)

' Get the selection extent:
Dim selStart = richTextBox1.SelectionStart
Dim selEnd = richTextBox1.SelectionStart + richTextBox1.SelectionLength


... perform processing here ...



' Turn events back on again:
SendMessage(richTextBox1.Handle, EM_SETEVENTMASK, 0, eventMask)

' Select the correct range (we must do this with events on otherwise
' the scroll state is inconsistent):
richTextBox1.Select(selStart, selSize)

' Turn redraw back on again:
SendMessage(richTextBox1.Handle, WM_SETREDRAW, 1, IntPtr.Zero)
richTextBox1.ResumeLayout()

' Show changes
richTextBox1.Invalidate()
GeneralRe: RTB Redraw problem Pin
IceWater4222-Sep-07 15:33
IceWater4222-Sep-07 15:33 
QuestionWindows service communication Pin
Justin Perez22-Sep-07 6:57
Justin Perez22-Sep-07 6:57 
AnswerRe: Windows service communication Pin
Justin Perez22-Sep-07 7:23
Justin Perez22-Sep-07 7:23 
GeneralRe: Windows service communication Pin
Scott Dorman22-Sep-07 14:25
professionalScott Dorman22-Sep-07 14:25 
QuestionXML Encryption Pin
Member 450778122-Sep-07 6:01
Member 450778122-Sep-07 6:01 
AnswerRe: XML Encryption Pin
Anthony Mushrow22-Sep-07 6:30
professionalAnthony Mushrow22-Sep-07 6:30 
AnswerRe: XML Encryption Pin
Scott Dorman22-Sep-07 14:26
professionalScott Dorman22-Sep-07 14:26 
AnswerRe: XML Encryption Pin
Nissim Salomon23-Sep-07 1:09
Nissim Salomon23-Sep-07 1:09 
QuestionTroubles closing a thread [modified] Pin
Anthony Mushrow22-Sep-07 5:49
professionalAnthony Mushrow22-Sep-07 5:49 
QuestionReceive TV remote controller signals? Pin
tmp022-Sep-07 4:05
tmp022-Sep-07 4:05 
QuestionGetting Processor Id Pin
M. J. Jaya Chitra22-Sep-07 2:32
M. J. Jaya Chitra22-Sep-07 2:32 
AnswerRe: Getting Processor Id Pin
Paul Conrad22-Sep-07 5:24
professionalPaul Conrad22-Sep-07 5:24 
AnswerRe: Getting Processor Id Pin
Nissim Salomon22-Sep-07 9:21
Nissim Salomon22-Sep-07 9:21 
Questionwhy my enum return value is in integer in C# Pin
nicolus22-Sep-07 2:19
nicolus22-Sep-07 2:19 
AnswerRe: why my enum return value is in integer in C# Pin
Lutosław22-Sep-07 2:27
Lutosław22-Sep-07 2:27 
GeneralRe: why my enum return value is in integer in C# Pin
nicolus22-Sep-07 2:35
nicolus22-Sep-07 2:35 
GeneralRe: why my enum return value is in integer in C# Pin
Lutosław22-Sep-07 2:45
Lutosław22-Sep-07 2:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.