Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
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
GeneralRe: How to Hide ScrollBar of RichtextBox Pin
Heath Stewart7-Jul-04 3:29
protectorHeath Stewart7-Jul-04 3:29 
GeneralRe: How to Hide ScrollBar of RichtextBox Pin
Jay Shankar12-Jul-04 22:54
Jay Shankar12-Jul-04 22:54 
GeneralRe: How to Hide ScrollBar of RichtextBox Pin
Heath Stewart13-Jul-04 3:26
protectorHeath Stewart13-Jul-04 3:26 
GeneralRe: How to Hide ScrollBar of RichtextBox Pin
Jay Shankar21-Jul-04 18:27
Jay Shankar21-Jul-04 18:27 
GeneralC#, XML, XPath problem Pin
velincho5-Jul-04 22:23
velincho5-Jul-04 22:23 
GeneralRe: C#, XML, XPath problem Pin
leppie6-Jul-04 7:26
leppie6-Jul-04 7:26 
GeneralRe: C#, XML, XPath problem Pin
velincho6-Jul-04 22:23
velincho6-Jul-04 22:23 
QuestionHOW TO CREATE IMAGE FRAMES FROM METAFILES Pin
gayathri_gopi5-Jul-04 22:22
gayathri_gopi5-Jul-04 22:22 
GeneralDllImport Pin
Anonymous5-Jul-04 22:12
Anonymous5-Jul-04 22:12 
GeneralRe: DllImport Pin
Anonymous5-Jul-04 22:26
Anonymous5-Jul-04 22:26 
GeneralRe: DllImport Pin
Stefan Troschuetz5-Jul-04 22:43
Stefan Troschuetz5-Jul-04 22:43 
GeneralDirectX Pin
Anonymous6-Jul-04 3:16
Anonymous6-Jul-04 3:16 
GeneralRe: DirectX Pin
Stefan Troschuetz6-Jul-04 3:48
Stefan Troschuetz6-Jul-04 3:48 
QuestionIs it possible to edit a bitmap programmatically? Pin
Pain_Elemental5-Jul-04 21:14
Pain_Elemental5-Jul-04 21:14 
AnswerRe: Is it possible to edit a bitmap programmatically? Pin
Dave Kreskowiak6-Jul-04 5:17
mveDave Kreskowiak6-Jul-04 5:17 
GeneralRe: Is it possible to edit a bitmap programmatically? Pin
Pain_Elemental6-Jul-04 19:50
Pain_Elemental6-Jul-04 19:50 
GeneralWanna Disscussion Forum Pin
RadhaKrishan5-Jul-04 21:14
RadhaKrishan5-Jul-04 21:14 

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.