질문 cue banner not working

  • Friday, August 17, 2012 2:20 PM
     
      Has Code

    I am using this code to set watermark for textbox but watermark now showing with no error.

    here is the code:

            // cue banner;
            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);
    

    and in Form_Load:

                SendMessage(txtLoginID.Handle, EM_SETCUEBANNER, 0, "login");
                SendMessage(txtPassword.Handle, EM_SETCUEBANNER, 0, "login now");
                SendMessage(txtPIN.Handle, EM_SETCUEBANNER, 0, "wow");
                SendMessage(txtLoginID.Handle, EM_SETCUEBANNER, 0, "login");
                SendMessage(txtPassword.Handle, EM_SETCUEBANNER, 0, "login now");
                SendMessage(txtPIN.Handle, EM_SETCUEBANNER, 0, "wow");
    

All Replies

  • Monday, August 20, 2012 9:02 AM
     
     

    Hi Jassim,

    Thank you for posting on this forum.

    I tried your code, yes, it shows without error. It seems it works well.

    So what do you mean "cue banner not working"?

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Monday, August 20, 2012 5:25 PM
     
     

    by cue banner not working I mean cue text is not showing and no error thrown.

    I just forgot to mention I am using TextEdit from DevXpress.

  • Tuesday, August 21, 2012 5:39 AM
     
     

    Hi Jassim,

    For this third-party product, please try its official site: http://www.devexpress.com/Support/Center/ 

    Thank you for your understanding and support.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.