> i have a textbox that used for entering password (passwordChar=*)
> when im doing cut,copy,paste to the textbox.text its not working
> how to do the paste in this case?
I just tried this (added a new System.Windows.Forms.TextBox to a form and
set its PasswordChar property to '*') and when I attempt to cut or copy
from it (Ctrl-X and Ctrl-C, respectively), a tooltip is displayed that
reads that I cannot copy text from a password field. The cut and copy
context menu (right-click) items are disabled. This is what I'd expect.
Pasting, on the other hand, works fine.
Can you explain what happens when you try, and how this doesn't meet your
expectations of what should happen?
s-galit - 27 Oct 2004 12:19 GMT
so you are saying that there is no way to do copy & cut to the password?
by the way the paste is working now
thank you for the help
Jon Skeet [C# MVP] - 27 Oct 2004 12:27 GMT
> so you are saying that there is no way to do copy & cut to the
> password?
It sounds like you're not wanting to do copy and cut *to* the password,
but *from* the password. This shouldn't be allowed for security
reasons.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
C# Learner - 27 Oct 2004 12:31 GMT
> so you are saying that there is no way to do copy & cut to the password?
Windows prevents it, and that seems logical to me -- imagine if an
application which remembers your password enabled copying from the password
text box. Someone else using your computer could then copy and paste your
password into Notepad, for example, and they'd see your password in clear
text.
s-galit - 27 Oct 2004 12:57 GMT
right... :) thanks
> > so you are saying that there is no way to do copy & cut to the password?
>
[quoted text clipped - 3 lines]
> password into Notepad, for example, and they'd see your password in clear
> text.