Here is a simple solution for setting the left and right margins of a RichTextBox that worked well for me in a C# Windows app. It sets both the right and left margins to 4 pixels.
[DllImport("user32.dll")]
static extern int SendMessage(IntPtr hWnd, uint wMsg, UIntPtr wParam, IntPtr lParam);
SendMessage(richtextbox1.Handle, 0xd3, (UIntPtr)0x3, (IntPtr)0x00040004);
I tried to make the SendMessage more proper below:
const int EM_SETMARGINS = 0xd3;
const int EC_LEFTMARGIN = 0x1;
const int EC_RIGHTMARGIN = 0x2;
SendMessage(richtextbox1.Handle, EM_SETMARGINS,
(UIntPtr)(EC_LEFTMARGIN | EC_RIGHTMARGIN), (IntPtr)0x00040004);
I figure this solution was not possible when the question was originally posted.