Fórum Fora de foco... #132119
02/02/2003
0
Morpheus
Curtir tópico
+ 0Posts
02/02/2003
Skaarj
Olha, ñ sei fzer cm o teclado, ms vou t pssar a função pra desmascarar senha [*], cmo o mouse vvc pssa sobre o texto em [*] que ele mostra em um Hint.. Msmo cm o prog minimizado, vai q t ajuda:
var
WndHint: THintWindow = nil; // declare a variável fora da procedure
procedure TForm1.Timer1Timer(Sender: TObject);
var
Pos: TPoint;
HWin: THandle;
Paswd: array[0..63] of Char;
R: TRect;
begin
GetCursorPos(Pos);
HWin := WindowFromPoint(Pos);
if SendMessage(HWin, EM_GETPASSWORDCHAR, 0, 0) <> 0 then
begin
if WndHint = nil then
begin
WndHint := THintWindow.Create(Self);
WndHint.Color := clInfoBk;
SendMessage(HWin, WM_GETTEXT, 64, Longint(@Paswd));
R := Rect(Pos.X, Pos.Y + 18, Pos.X +
WndHint.Canvas.TextWidth(Paswd) + 8,
Pos.Y + 18 + WndHint.Canvas.TextHeight(Paswd));
WndHint.ActivateHint(R, Paswd);
end;
end
else if WndHint <> nil then
begin
WndHint.ReleaseHandle;
WndHint := nil;
end;
end;
Gostei + 0
03/02/2003
Anonymous
C:\Arquivos Comuns\Borland Shared\MSHelp\Win32.hlp.... ou qualquer coisa parecida.... eu não sei bem certo qual é a mensagem mas sei que tem pq uma vez eu usei algo parecido !!!
valeu
Gostei + 0
03/02/2003
Rubensavelino
Ate rubensavelino
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)