How can I use SendMessage API to change the Appearance from 3D to Flat on a RichTextBox at runtime? What Message do I send to change the style/appearance?
Printable View
How can I use SendMessage API to change the Appearance from 3D to Flat on a RichTextBox at runtime? What Message do I send to change the style/appearance?
Here's a list of messages to change window style
http://msdn.microsoft.com/library/de...box_styles.asp
I think you have to take out the WS_EX_CLIENTEDGE style.
e.g:
SetWindowLong rtb.hwnd, GWL_EXSTYLE GetWindowLong(rtb.hwnd, GWL_EXSTYLE) Xor WS_EX_CLIENTEDGE
Thanks Jim thats great if I want to switch to other things also.
Megatron you're the BOMB! :D
If anyone else wants to do this here you go:
VB Code:
Dim style As Long style = GetWindowLong(RichTextBox1.hwnd, GWL_EXSTYLE) Xor WS_EX_CLIENTEDGE SetWindowLong RichTextBox1.hwnd, GWL_EXSTYLE, style SetWindowPos RichTextBox1.hwnd, Form1.hwnd, 0, 0, 0, 0, SWP_FLAGS