Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scrolled event?
Message
General information
Forum:
ASP.NET
Category:
Forms
Title:
Miscellaneous
Thread ID:
00692313
Message ID:
00692545
Views:
16
Try the following it works !!!
[DllImport("user32", CharSet=CharSet.Auto)] 
public static extern IntPtr SendMessage(IntPtr hWnd, int msg, int wParam, int notused); 

private void textBox1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
	const int EM_SCROLL = 0x00B5; 
	SendMessage(this.textBox2.Handle, EM_SCROLL, 1,0);
}
I am trying to scroll TextBox2 from TextBox1 mouse up. Also, you will need to import System.Runtime.InteropServices namespace.


>Hi, everybody!
>
>I have two "multiline" textboxes on a WinForm. When the user click on the vertical scroll bar of one textbox, I need to make the other textbox scroll as well.
>
>What event is fired in such a situation?
>
>And how can I make the second textbox scroll programatically?
>
>TIA
- Jayesh
Previous
Reply
Map
View

Click here to load this message in the networking platform