Live Chat Icon For mobile
Live Chat Icon

How do I send a EM_XXXX message to a textbox to get some value such as line index in C#

Platform: WinForms| Category: TextBox

There is a protected SendMessage call you can use for this purpose, so you have to derive from TextBox.

	public MyTextBox : TextBox 
	{
		private const int EM_XXXX = 0x1234;
		public int LineIndex 
		{
			get 
			{
            				return base.SendMessage(EM_XXXX, 0, 0);
        			}
    		}
	}

(from sburke_online@microsoft..nospam..com on microsoft.public.dotnet.framework.windowsforms)

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.