AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Wie kann ich en Edit Feld schützen

Ein Thema von Wishmaster · begonnen am 8. Dez 2006 · letzter Beitrag vom 6. Feb 2007
Antwort Antwort
Seite 2 von 2     12   
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#11

Re: Wie kann ich en Edit Feld schützen

  Alt 8. Dez 2006, 23:00
Zitat von Bernhard Geyer:
Zitat von Wishmaster:
Ich arbeite zu zeit an einem Login Dialog für mein Prog. was mich interessieren würde ist wie kann ich die Edit(TEdit) Felder schützen? Es gibt ja en Haufen Programme im netz mit denen man diese Informationen Auslesen kann.
Welche? Jedenfalls kann man diesen Text nicht über Windows-Messages auslesen!
Das funktioniert aber erst ab Windows XP. Ob Es bei Windows NT und 2000 auch nicht geht, weiß ich jetzt gerad nicht.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von xZise
xZise

Registriert seit: 3. Mär 2006
Ort: Waldbronn
4.303 Beiträge
 
Delphi 2009 Professional
 
#12

Re: Wie kann ich en Edit Feld schützen

  Alt 10. Dez 2006, 21:19
Also ich hätte es so gemacht:

Du überprüfst, was der Author am Edit ändert (z.B. am schluss ein "x" einsetzen)
und änderst es in einem unabhängigen String, welcher Edit1.text ersetzt.
Fabian
Eigentlich hat MS Windows ab Vista den Hang zur Selbstzerstörung abgewöhnt – mkinzler
  Mit Zitat antworten Zitat
Wishmaster

Registriert seit: 14. Sep 2002
Ort: Steinbach, MB, Canada
301 Beiträge
 
Delphi XE2 Architect
 
#13

Re: Wie kann ich en Edit Feld schützen

  Alt 21. Jan 2007, 23:52
Hi

Ich habe ne Lösung gefunden (Komponente) allerdings sind da noch feiler die ich nicht finden bzw. lösen kann.

Feileich kann eine mir weiterhelfen?

Die Komponente wird mit einem TEdit gekoppelt

Der feiler ist jetzt, wen die Zeichen Länge im Edit Feld = 1 ist und man den geheim string einer Memo oder Label zuweist is die Länge der Zeichen = 2.

Exemplar.

Edit1.text = t
Label.Caption = tt

Der zweite feiler er erkennt die shift taste nicht, nur kleine Buchstaben


Delphi-Quellcode:
unit JB_Hookedit;

interface

uses
 Messages, SysUtils, ClipBrd, Classes, StdCtrls, ExtCtrls;

type
  THookEvent = procedure(nCode: Integer; wParam, lParam: Integer) of object;

 TJB_HookEdit = class(TComponent)
  private
    FHookEdit : TCustomEdit;
    FActive : Boolean;


    FOnGetMsg : THookEvent;
    FOnWndProc : THookEvent;
    FOnWndProcRet : THookEvent;

    function GetSecretChar: Char;
    function GetSecretTextMaxLength: Integer;
    procedure SetHookEdit(const Value: TCustomEdit);
    procedure SetSecretChar(const Value: Char);
    procedure SetSecretTextMaxLength(const Value: Integer);
    procedure SetActive(const Value: Boolean);
    procedure SetOnGetMsg(const Value: THookEvent);
    procedure SetOnWndProc(const Value: THookEvent);
    procedure SetOnWndProcRet(const Value: THookEvent);
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;

    function SecretText: string; overload;
    function SecretText(AEdit: TCustomEdit): string; overload;
    procedure Clear;
    procedure RegisterHooks;

    property Active: Boolean read FActive write SetActive;
  published
    property HookEdit: TCustomEdit read FHookEdit write SetHookEdit;
    property SecretChar: Char read GetSecretChar write SetSecretChar;
    property SecretTextMaxLength: Integer read GetSecretTextMaxLength write SetSecretTextMaxLength;
    property OnGetMsg: THookEvent read FOnGetMsg write SetOnGetMsg;
    property OnWndProc: THookEvent read FOnWndProc write SetOnWndProc;
    property OnWndProcRet: THookEvent read FOnWndProcRet write SetOnWndProcRet;
  end;


procedure Register;


implementation

uses
  Windows;

var
  FClipBoard : TClipBoard = nil;
  FSecretLines : TStringList = nil;

  FKeyState : TKeyBoardState;
  FCTRLDown : Boolean = false;
  FInitCBText : string; // CB = ClipBoard

  FHookWnd : HWND = 0;
  FHook_GetMsg : HHOOK = 0;
  FHook_WndProc : HHOOK = 0;
  FHook_WndProcRet : HHOOK = 0;

  FSecretLineID : Integer = 0;
  FSecretChar : Char = '*';
  FSecretTextMaxLength : Integer = 0;

  FMX_HookEdit : TJB_HookEdit = nil;




procedure RegHooks; forward;
procedure UnregHooks; forward;
function ProcessStr(var S: string; MaxLength: Integer): Boolean; forward;
procedure CleanupString(var S: string); forward;
procedure GetStartEndSel(var StartSel, EndSel: Integer); forward;



{ Create }
constructor TJB_HookEdit.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  //
  if (FMX_HookEdit <> nil) then
   begin
    if (FMX_HookEdit.Owner <> nil) then
    FMX_HookEdit.Owner.RemoveComponent(FMX_HookEdit);
    FMX_HookEdit.Free;
   end;
  //
  // FPreventPaste:= true;

  //
  FMX_HookEdit := Self;
  //
  FActive := false;
  FHookEdit := nil;
  FSecretLineID := -1;
  FSecretChar := '*';
  FSecretTextMaxLength := 0;
  //
  if (FSecretLines = nil) then FSecretLines := TStringList.Create;
  if (FClipBoard = nil) then FClipBoard := TClipBoard.Create;
end;


{
    Password_Edit.Font.Charset := 2;
  Password_Edit.PasswordChar := 'l';
}



{ Destroy }
destructor TJB_HookEdit.Destroy;
begin
  try
    UnregHooks;
    if (FClipBoard <> nil) then
     begin
      FClipBoard.Free;
      FClipBoard:= nil
     end;


    if (FSecretLines <> nil) then
     begin
      FSecretLines.Free;
      FSecretLines := nil
     end;
    //
    FMX_HookEdit := nil;
  finally
    inherited;
  end;
end;

{ RegisterHooks }
procedure TJB_HookEdit.RegisterHooks;
begin
  RegHooks;
end;

{ Clear }
procedure TJB_HookEdit.Clear;
var
  I : Integer;
begin
  FInitCBText := '';
 if (FSecretLines <> nil) then
  for I := 0 to FSecretLines.Count - 1 do
   FSecretLines[I] := '';
end;

{ SecretText - I }
function TJB_HookEdit.SecretText: string;
begin
  Result := SecretText(FHookEdit);
end;


function TJB_HookEdit.SecretText(AEdit: TCustomEdit): string;
var
  I, IMax : Integer;
  VEditFound : Boolean;
begin
  Result := '';
  if (not (AEdit is TCustomEdit)) or (FSecretLines = nil) then
   Exit;
  //
  if (FSecretLines.Count > 0) then
   begin

    I := -1;
    IMax := FSecretLines.Count -1 ;
    repeat
      Inc(I);
      VEditFound := (TCustomEdit(FSecretLines.Objects[I]) = AEdit);
   if VEditFound then
      Result := FSecretLines[I];
    until
    (I = IMax) or VEditFound;
  end;
end;

{ GetSecretChar }
function TJB_HookEdit.GetSecretChar: Char;
begin
  Result := FSecretChar;
end;

{ GetSecretTextMaxLength }
function TJB_HookEdit.GetSecretTextMaxLength: Integer;
begin
  Result := FSecretTextMaxLength;
end;

{ SetHookEdit}
procedure TJB_HookEdit.SetHookEdit(const Value: TCustomEdit);
var
  I, IMax : Integer;
  VEditFound : Boolean;
  VText : string;
begin


  if (FHookEdit <> Value) then
   begin
    FHookEdit := Value;
    FHookWnd := 0;
    FSecretLineID := -1;
    //
    if (FHookEdit <> nil) then
     begin
      FHookWnd := FHookEdit.Handle;
      VEditFound := false;
      //
      if (FSecretLines <> nil) then
       begin
        if (FSecretLines.Count > 0) then
         begin
          I := -1;
          IMax := FSecretLines.Count - 1;
         repeat
           Inc(I);
           VEditFound := TCustomEdit(FSecretLines.Objects[I]) = FHookEdit;
        until
         (I = IMax) or VEditFound;

         if VEditFound then
          FSecretLineID := I;
        end;
        //
        if (not VEditFound) then
         begin
          FSecretLineID := FSecretLines.Count;
          VText := FHookEdit.Text;
          FSecretLines.AddObject(VText, FHookEdit);
          //
         for I := 1 to Length(VText) do
          VText[I] := SecretChar;
          FHookEdit.Text := VText;
        end;
      end;
    end;
  end;
end;

{ SetSecretChar }
procedure TJB_HookEdit.SetSecretChar(const Value: Char);
begin
  FSecretChar := Value;
end;

{ SetSecretTextMaxLength }
procedure TJB_HookEdit.SetSecretTextMaxLength(const Value: Integer);
begin
  FSecretTextMaxLength := Value;
end;

{ SetActive }
procedure TJB_HookEdit.SetActive(const Value: Boolean);
begin
  FActive := Value and (not (csDesigning in ComponentState));
  if FActive then RegHooks else UnregHooks;
end;

{ SetSecretLine }
procedure SetSecretLine(ALineID: Integer; const ALine: string);
var
  VLine : string;
begin
  if (FSecretLines <> nil) and (ALineID >= 0) and (ALineID < FSecretLines.Count) then
   begin
    VLine := ALine;
    CleanupString(VLine);
    FSecretLines[ALineID] := VLine;
  end;
end;

{ ProcessStr }
function ProcessStr(var S: string; MaxLength: Integer): Boolean;
var
  VLen : Integer;
begin
  VLen := 0;
   if (S <> '') and (MaxLength > 0) then
    begin
     CleanupString(S);
     VLen := Length(S) - MaxLength;
 if (VLen > 0) then
     Delete(S, MaxLength + 1, VLen);
   end;
  Result := (VLen <= 0);
end;

{ CleanupString }
procedure CleanupString(var S: string);
var
  I, IMax : Integer;
  VChar : Char;
begin
  IMax := Length(S);
  for I := IMax downto 1 do
   begin
    if (S[I] = #$0A) then
     begin
      if (I = 1) then
       VChar := #0
     else
      VChar := S[I - 1];
  if (VChar <> #$0D) then
     Delete(S, I, 1);
    end;
    //
   if (S[I] = #$0D) then
    begin
     if (I = IMax) then
      VChar := #0
     else
      VChar := S[I + 1];
  if (VChar <> #$0A) then
       Delete(S, I, 1);
    end;
  end;
end;

{ GetStartEndSel }
procedure GetStartEndSel(var StartSel, EndSel: Integer);
var
  VResult : Integer;
begin
   if IsWindow(FHookWnd) then
      VResult := SendMessage(FHookWnd, EM_GETSEL, 0, 0)
    else
      VResult := -1;
  //
  if (VResult <> -1) then
   begin
    StartSel := (VResult and $0000FFFF);
    EndSel := (VResult and $FFFF0000) shr 8; // original 16
   end
 else
   begin
    StartSel := 0;
    EndSel := 0;
  end;
end;

{ GetMsgProc }
function GetMsgProc(nCode: Integer; wParam, lParam: Integer): LResult; stdcall;
{ process messages:
    WM_KEYUP
      VK_CONTROL
    WM_KEYDOWN
      VK_CONTROL
      VK_BACK
      VK_DELETE
      VK_ENTER
    WM_CHAR
}

const
  VChar = $38;
var
  VMsg : PMsg;
  VMess : Cardinal;
  VWndValid : Boolean;
  VStartSel : Integer;
  VEndSel : Integer;
  VKeyState : TKeyBoardState;
  VVirtKey : Integer;
  VScanCode : Integer;
  VCharCode : array[0..3] of Char;
  VRetVal : Smallint;
  VKBLayout : HKL;
  S : string;
begin
  Result := 0;
  //
  if (nCode < 0) then
    Result := CallNextHookEx(FHook_GetMsg, nCode, wParam, lParam)
  else
   if (nCode = HC_ACTION) then
    begin
    VMsg := PMsg(Pointer(lParam));
    VWndValid := IsWindow(FHookWnd) and (VMsg.hwnd = FHookWnd);
 if VWndValid and (FSecretLines <> nil) and (FSecretLineID >= 0) and (FSecretLineID < FSecretLines.Count) then begin
    S := FSecretLines[FSecretLineID];
    VMess := VMsg.message;

  case VMess of
        // WM_KEYUP
       WM_KEYUP : begin
       VVirtKey := VMsg.wParam;
  case VVirtKey of
       // VK_CONTROL
       VK_CONTROL : begin
       FCTRLDown := false;
            end;
          end;
        end;
        // WM_KEYDOWN
        WM_KEYDOWN : begin
          GetKeyBoardState(FKeyState);
          //
          VVirtKey := VMsg.wParam;
          case VVirtKey of
           // VK_CONTROL
            VK_CONTROL : begin
              FCTRLDown := true;
            end;
            // VK_BACK
            VK_BACK : begin
              GetStartEndSel(VStartSel, VEndSel);
              Delete(S, VStartSel, VEndSel - VStartSel + 1);
            end;
            // VK_DELETE
            VK_DELETE : begin
              GetStartEndSel(VStartSel, VEndSel);
          if (VEndSel = VStartSel) then
              Delete(S, VStartSel + 1, VEndSel - VStartSel + 1)
            else
              Delete(S, VStartSel + 1, VEndSel - VStartSel);
            end;
            // VK_RETURN
            VK_RETURN : begin
              GetStartEndSel(VStartSel, VEndSel);
              Delete(S, VStartSel + 1, VEndSel - VStartSel);
            end;

            // VK_...
           else
            begin
             if not FCTRLDown then
               begin
                GetKeyBoardState(VKeyState);
                VScanCode := VMsg.lParam and $FF0000;

                ZeroMemory(@VCharCode, SizeOf(VCharCode));
                VKBLayout := GetKeyBoardLayout(GetCurrentThreadID);
                VRetVal := ToASCIIEx(VVirtKey, VScanCode, VKeyState, @VCharCode, 0, VKBLayout);
                //
            if (VRetVal <> 0) then
             begin
                GetStartEndSel(VStartSel, VEndSel);
                Delete(S, VStartSel + 1, VEndSel - VStartSel);
                Insert(VCharCode, S, VStartSel + 1);
                  //
             if ProcessStr(S, FSecretTextMaxLength) then
              begin
                VKeyState[VK_SHIFT] := 0;
                SetKeyBoardState(VKeyState);
                VMsg.wParam := VChar;
               end
              else
                VMsg.wParam := 0
              end;
             end;
            end;
           end;
          end;
        // WM_CHAR
        WM_CHAR : begin
          case VMsg.wParam of
            $09 : S := S + #09;
            $0D : S := S + #$0D#$0A;
            VChar : VMsg.wParam := Ord(FSecretChar);
          end;
          //
          SetKeyBoardState(FKeyState);
        end;
      end;
      //
      SetSecretLine(FSecretLineID, S);
    end;
  end;
  //
 if (FMX_HookEdit <> nil) and Assigned(FMX_HookEdit.FOnGetMsg) then
  FMX_HookEdit.FOnGetMsg(nCode, wParam, lParam);
end;

{ CallWndProc }
function CallWndProc(nCode: Integer; wParam, lParam: Integer): LResult; stdcall;
{ process messages:
    WM_PASTE
    WM_CLEAR
    WM_CUT
}

var
  VStruct : PCWPSTRUCT;
  VMess : Cardinal;
  VWndValid : Boolean;
  VStartSel : Integer;
  VEndSel : Integer;
  VCBText : string;
  VCBBuffSize : Integer;
  S : string;
begin
  Result := 0;
  //
  if (nCode < 0) then
    Result := CallNextHookEx(FHook_GetMsg, nCode, wParam, lParam)
  else
  if (nCode = HC_ACTION) then
   begin
    VStruct := PCWPSTRUCT(Pointer(lParam));
    VWndValid := IsWindow(FHookWnd) and (VStruct.hwnd = FHookWnd);

    if VWndValid and (FClipBoard <> nil) and (FSecretLines <> nil) and (FSecretLineID >= 0) and (FSecretLineID < FSecretLines.Count) then begin
      S := FSecretLines[FSecretLineID];
      VMess := VStruct.message;
      //
      case VMess of
        // WM_PASTE
        WM_PASTE : begin


          FInitCBText := FClipBoard.AsText;
          VCBBuffSize := Length(FInitCBText);
          SetLength(VCBText, VCBBuffSize); FillMemory(PChar(VCBText), VCBBuffSize, Ord(FSecretChar));
          FClipBoard.SetTextBuf(PChar(VCBText));
          //
          GetStartEndSel(VStartSel, VEndSel);
          Delete(S, VStartSel + 1, VEndSel - VStartSel);
          Insert(FInitCBText, S, VStartSel + 1);
          //
          ProcessStr(S, FSecretTextMaxLength);
        end;
        // WM_CLEAR, WM_CUT
        WM_CLEAR, WM_CUT : begin
          GetStartEndSel(VStartSel, VEndSel);
          if (VEndSel = VStartSel) then
           Delete(S, VStartSel + 1, VEndSel - VStartSel + 1)
          else
           Delete(S, VStartSel + 1, VEndSel - VStartSel);
         end;
       end;
      //
      SetSecretLine(FSecretLineID, S);
    end;
  end;
  //
  if (FMX_HookEdit <> nil) and Assigned(FMX_HookEdit.FOnWndProc) then
   FMX_HookEdit.FOnWndProc(nCode, wParam, lParam);
end;

{ CallWndProcRet }
function CallWndProcRet(nCode: Integer; wParam, lParam: Integer): LResult; stdcall;
{ process messages:
    WM_PASTE
}

var
  VStruct : PCWPRETSTRUCT;
  VMess : Cardinal;
  VWndValid : Boolean;
begin
  Result := 0;

  if (nCode < 0) then
    Result := CallNextHookEx(FHook_GetMsg, nCode, wParam, lParam)
  else
   if (nCode = HC_ACTION) then
    begin
     VStruct := PCWPRETSTRUCT(Pointer(lParam));
     VWndValid := IsWindow(FHookWnd) and (VStruct.hwnd = FHookWnd);
  if VWndValid and (FClipBoard <> nil) then
   begin
     VMess := VStruct.message;
      //
     case VMess of
        // WM_PASTE
        WM_PASTE : begin
          FClipBoard.SetTextBuf(PChar(FInitCBText));
        end;
      end;
    end;
  end;
  //
  if (FMX_HookEdit <> nil) and Assigned(FMX_HookEdit.FOnWndProcRet) then
   FMX_HookEdit.FOnWndProcRet(nCode, wParam, lParam);
end;

{ RegHook_GetMsg }
procedure RegHook_GetMsg;
begin
  if (FHook_GetMsg = 0) then
   FHook_GetMsg := SetWindowsHookEx(WH_GETMESSAGE, @GetMsgProc, HInstance, GetCurrentThreadID)
  else
   begin
   if UnhookWindowsHookEx(FHook_GetMsg) then
     FHook_GetMsg := SetWindowsHookEx(WH_GETMESSAGE, @GetMsgProc, HInstance, GetCurrentThreadID)
  end;
end;

{ UnregHook_GetMsg }
procedure UnregHook_GetMsg;
begin
  if (FHook_GetMsg <> 0) then
  if UnhookWindowsHookEx(FHook_GetMsg) then
   FHook_GetMsg := 0;
end;

{ RegHook_WndProc }
procedure RegHook_WndProc;
begin
  if (FHook_WndProc = 0) then
   FHook_WndProc := SetWindowsHookEx(WH_CALLWNDPROC, @CallWndProc, HInstance, GetCurrentThreadID)
 else
  begin
   if UnhookWindowsHookEx(FHook_WndProc) then
    FHook_WndProc := SetWindowsHookEx(WH_CALLWNDPROC, @CallWndProc, HInstance, GetCurrentThreadID)
  end;
end;

{ UnregHook_WndProc }
procedure UnregHook_WndProc;
begin
 if (FHook_WndProc <> 0) then
  if UnhookWindowsHookEx(FHook_WndProc) then
   FHook_WndProc := 0;
end;

{ RegHook_WndProcRet }
procedure RegHook_WndProcRet;
begin
  if (FHook_WndProcRet = 0) then
   FHook_WndProcRet := SetWindowsHookEx(WH_CALLWNDPROCRET, @CallWndProcRet, HInstance, GetCurrentThreadID)
 else
  begin
   if UnhookWindowsHookEx(FHook_WndProcRet) then
    FHook_WndProcRet := SetWindowsHookEx(WH_CALLWNDPROCRET, @CallWndProcRet, HInstance, GetCurrentThreadID)
  end;
end;

{ UnregHook_WndProcRet }
procedure UnregHook_WndProcRet;
begin
 if (FHook_WndProcRet <> 0) then
  if UnhookWindowsHookEx(FHook_WndProcRet) then
   FHook_WndProcRet := 0;
end;

{ RegHooks}
procedure RegHooks;
begin
  RegHook_WndProcRet;
  RegHook_WndProc;
  RegHook_GetMsg;
end;

{ UnregHooks }
procedure UnregHooks;
begin
  UnregHook_GetMsg;
  UnregHook_WndProc;
  UnregHook_WndProcRet;
end;

{ SetOnGetMsg }
procedure TJB_HookEdit.SetOnGetMsg(const Value: THookEvent);
begin
  FOnGetMsg := Value;
end;

{ SetOnWndProc }
procedure TJB_HookEdit.SetOnWndProc(const Value: THookEvent);
begin
  FOnWndProc := Value;
end;

{ SetOnWndProcRet }
procedure TJB_HookEdit.SetOnWndProcRet(const Value: THookEvent);
begin
  FOnWndProcRet := Value;
end;


procedure Register;
begin
  RegisterComponents('JB Security', [TJB_HookEdit]);
end;

end.
  Mit Zitat antworten Zitat
Benutzerbild von Sunlight7
Sunlight7

Registriert seit: 17. Sep 2006
Ort: Sonnensystem, Zentral
1.522 Beiträge
 
Delphi 5 Standard
 
#14

Re: Wie kann ich en Edit Feld schützen

  Alt 22. Jan 2007, 00:31
'n Abend oder Moin!

Also bei mir klappt das Problemlos...
Ich kann keinen Feiler finden.

Delphi-Quellcode:
procedure TForm1.JB_HookEdit1GetMsg(nCode, wParam, lParam: Integer);
begin
   Label1.Caption:=JB_HookEdit1.SecretText;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
   JB_HookEdit1.Active:=True;
end;
Grüßle!

PS: Hänge die 691 Zeilen Quelltext bitte als Unit an
Windows: Ja - Microsoft: Nein -> www.ReactOS.org
  Mit Zitat antworten Zitat
Wishmaster

Registriert seit: 14. Sep 2002
Ort: Steinbach, MB, Canada
301 Beiträge
 
Delphi XE2 Architect
 
#15

Re: Wie kann ich en Edit Feld schützen

  Alt 22. Jan 2007, 01:06
Bei mir ist Abend 6:58 PM

Zitat:
Also bei mir klappt das Problemlos...
Ich kann keinen Feiler finden.
Bei mir nicht! Feileich liegt es an BDS2006?

Zitat:
PS: Hänge die 691 Zeilen Quelltext bitte als Unit an
Oh ja hast recht! Hab nicht daran gedacht.
Miniaturansicht angehängter Grafiken
error_113.jpg  
  Mit Zitat antworten Zitat
Benutzerbild von Sunlight7
Sunlight7

Registriert seit: 17. Sep 2006
Ort: Sonnensystem, Zentral
1.522 Beiträge
 
Delphi 5 Standard
 
#16

Re: Wie kann ich en Edit Feld schützen

  Alt 22. Jan 2007, 01:17
Wie hast Du die Kompo angesteuert?
Ich hab nur die 7 Zeilen, die oben stehen verwendet.

Wenn Du BDS 2006 verwendest, wie kommts zum Delphi 5 Symbol in der Anwendung?
Windows: Ja - Microsoft: Nein -> www.ReactOS.org
  Mit Zitat antworten Zitat
Wishmaster

Registriert seit: 14. Sep 2002
Ort: Steinbach, MB, Canada
301 Beiträge
 
Delphi XE2 Architect
 
#17

Re: Wie kann ich en Edit Feld schützen

  Alt 22. Jan 2007, 02:02
Komponente Installiert, Die TEdit eingebunden und sonst das selbe wie auch du.

Wen ich text vom Clipboard einfüge funzt alles wie es soll, dann geht’s auch mit Grossen Buchstaben!

Die compo wurde ursprünglich mit Delphi 5 geschrieben, ich benutze seit kurzem BDS2006! Dar wahren einige feiler die ich schon beseitigt habe wie

EndSel := (VResult and $FFFF0000) shr 8; < ursprünglich shr 16 Mit shr 16 hat er mir alles doppelt angezeigt.

Beispielsweise wen im edit 123 steht hat er mir 112233 angezeigt. Jetzt macht er das nur wen die Länge der der Zeichen = 1 ist

Beispiel 1

Edit.text:= t
SecretText:= tt

Beispiel 2
Edit.text:= test
SecretText:= test
  Mit Zitat antworten Zitat
Benutzerbild von Sunlight7
Sunlight7

Registriert seit: 17. Sep 2006
Ort: Sonnensystem, Zentral
1.522 Beiträge
 
Delphi 5 Standard
 
#18

Re: Wie kann ich en Edit Feld schützen

  Alt 22. Jan 2007, 02:26
Okay, da kann ich dann net weiterhelfen, mußte warten, bis einer mit BDS2006 rein guckt.
Windows: Ja - Microsoft: Nein -> www.ReactOS.org
  Mit Zitat antworten Zitat
Wishmaster

Registriert seit: 14. Sep 2002
Ort: Steinbach, MB, Canada
301 Beiträge
 
Delphi XE2 Architect
 
#19

Re: Wie kann ich en Edit Feld schützen

  Alt 6. Feb 2007, 00:23
Hi

Wollte nur mal nachfragen ob sich jemand damit beschäftigt hat?

Feileicht liegt der feiler ja an meinem Rechner.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:58 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz