I read some articles with regards on watermarks in windows app, but I found it to be quite complicated. What is the best way to implement watermark in textboxes?
AngelicOne
4
Posting Whiz
Recommended Answers
Jump to PostAdd this:
public static class TextBoxWatermarkExtensionMethod { private const uint ECM_FIRST = 0x1500; private const uint EM_SETCUEBANNER = ECM_FIRST + 1; [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)] private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, uint wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam); public static void SetWatermark(this TextBox textBox, …
All 9 Replies
Momerath
1,327
Nearly a Senior Poster
Featured Poster
AngelicOne
commented:
thanks
+1
AngelicOne
4
Posting Whiz
AngelicOne
4
Posting Whiz
Momerath
1,327
Nearly a Senior Poster
Featured Poster
AngelicOne
4
Posting Whiz
Momerath
1,327
Nearly a Senior Poster
Featured Poster
AngelicOne
4
Posting Whiz
AngelicOne
4
Posting Whiz
Momerath
1,327
Nearly a Senior Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.