Click here to Skip to main content
15,908,274 members
Home / Discussions / C#
   

C#

 
GeneralRe: backward compatibility Pin
Heath Stewart6-Jul-04 4:42
protectorHeath Stewart6-Jul-04 4:42 
GeneralDebug and Trace Pin
sreejith ss nair5-Jul-04 23:33
sreejith ss nair5-Jul-04 23:33 
GeneralRe: Debug and Trace Pin
Heath Stewart6-Jul-04 4:37
protectorHeath Stewart6-Jul-04 4:37 
GeneralDebug and Trace Pin
sreejith ss nair5-Jul-04 23:32
sreejith ss nair5-Jul-04 23:32 
GeneralRe: Debug and Trace Pin
Colin Angus Mackay5-Jul-04 23:37
Colin Angus Mackay5-Jul-04 23:37 
GeneralRe: Debug and Trace Pin
sreejith ss nair5-Jul-04 23:44
sreejith ss nair5-Jul-04 23:44 
Generallocalized application Pin
sreejith ss nair5-Jul-04 23:24
sreejith ss nair5-Jul-04 23:24 
GeneralRe: localized application Pin
Colin Angus Mackay5-Jul-04 23:33
Colin Angus Mackay5-Jul-04 23:33 
GeneralRe: localized application Pin
sreejith ss nair5-Jul-04 23:34
sreejith ss nair5-Jul-04 23:34 
GeneralRe: localized application Pin
Colin Angus Mackay5-Jul-04 23:40
Colin Angus Mackay5-Jul-04 23:40 
GeneralRe: localized application Pin
sreejith ss nair5-Jul-04 23:47
sreejith ss nair5-Jul-04 23:47 
GeneralRe: localized application Pin
sreejith ss nair5-Jul-04 23:54
sreejith ss nair5-Jul-04 23:54 
GeneralRe: localized application Pin
Colin Angus Mackay6-Jul-04 0:12
Colin Angus Mackay6-Jul-04 0:12 
GeneralRe: localized application Pin
Colin Angus Mackay5-Jul-04 23:55
Colin Angus Mackay5-Jul-04 23:55 
GeneralRe: localized application Pin
sreejith ss nair6-Jul-04 0:10
sreejith ss nair6-Jul-04 0:10 
Generallisence Pin
sreejith ss nair5-Jul-04 23:14
sreejith ss nair5-Jul-04 23:14 
GeneralRe: lisence Pin
Heath Stewart6-Jul-04 5:20
protectorHeath Stewart6-Jul-04 5:20 
Generalbitmap constructor throws InvalidArgumentException Pin
Pain_Elemental5-Jul-04 22:45
Pain_Elemental5-Jul-04 22:45 
GeneralRe: bitmap constructor throws InvalidArgumentException Pin
Anonymous6-Jul-04 3:45
Anonymous6-Jul-04 3:45 
GeneralRe: bitmap constructor throws InvalidArgumentException Pin
Dave Kreskowiak6-Jul-04 5:50
mveDave Kreskowiak6-Jul-04 5:50 
QuestionHow to Hide ScrollBar of RichtextBox Pin
Jay Shankar5-Jul-04 22:30
Jay Shankar5-Jul-04 22:30 
AnswerRe: How to Hide ScrollBar of RichtextBox Pin
Stefan Troschuetz5-Jul-04 22:59
Stefan Troschuetz5-Jul-04 22:59 
GeneralRe: How to Hide ScrollBar of RichtextBox Pin
Jay Shankar5-Jul-04 23:30
Jay Shankar5-Jul-04 23:30 
GeneralRe: How to Hide ScrollBar of RichtextBox Pin
Heath Stewart6-Jul-04 5:45
protectorHeath Stewart6-Jul-04 5:45 
GeneralRe: How to Hide ScrollBar of RichtextBox Pin
Jay Shankar6-Jul-04 18:04
Jay Shankar6-Jul-04 18:04 
Dear Heath,
I am doing the same. Please refer to the code below:

protected override void WndProc(ref System.Windows.Forms.Message m)
{
	if(m.Msg == WM_MOUSEWHEEL) //WM_MOUSEWHEEL 0x020a
	{
		if(Control.ModifierKeys != Keys.Control)
		{
			MouseWheelRollingEventArgs e = new 
				MouseWheelRollingEventArgs(m.WParam, m.LParam);
			MouseWheelRolling(this, e);
			base.WndProc(ref m); 

		}
		else
		{
			return;
		}

	}
	else if( m.Msg == WM_VSCROLL )
	{
		//process similarly for scroll, below 
		//.....
		//.....
		base.WndProc (ref m); 
	}
	else
	{
		base.WndProc (ref m);  
	}

}



private void rtb_MouseWheelRolling(object sender, TextEditor.MouseWheelRollingEventArgs e)
{

	//note : lineSrNo is the other richTextBox I am syncronising
	const int WM_MOUSEWHELL = 0x020a;
	PostMessageA((int)lineSrNo.Handle,WM_MOUSEWHELL, (int) e.wp, (int) e.lp);
}


rtb and lineSrNo are the two richTextBoxes, I want to syncronise.
lineSrNo richTextBox contains the lineNumbers of rtb richTextBox.
When ever user scrolls the rtb richTextBox(using MouseWheel rolling or ScrollBar) correspondingly lineSrNo richTextBox should also get scrolled.
Line numbers are added in the lineSrNo richTextBox when ever user enters any line in rtb richTextBox.

lineSrNo richTextBox Locked property is set to True and I am scrolling it programetically.

I am able to acheive the target, but I do not want scrollBar in lineSrNo richTextBox

That is the reason, I am asking the way out to hide the scrollBar of the richTextBox or set its width to 0.

Regards,

Jay

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.