NewCheats

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
NewCheats

Melhorando a cada instante

Bem Vindo - New Cheats
Vagas para Equipe
Regras importantes

    [Tutorial Delphi ] Criando um Gerador de Nick

    ProtectoR
    ProtectoR
    Membro
    Membro


    Mensagens : 5
    Agradecimentos! : 14
    Data de inscrição : 15/06/2010

    Up [Tutorial Delphi ] Criando um Gerador de Nick

    Mensagem por ProtectoR Ter Jun 15, 2010 11:39 pm

    Adicione 2 Edit e 1 Button

    Declare a Função :

    Code
    function Procode(ProtectoR: string; Pro: integer; Code: integer): string;
    begin
    Result := Copy(ProtectoR, Pro, Code);
    end;

    No evento onchange do Edit1 coloque:

    Code


    var
    ProtectoR: String;
    begin
    ProtectoR:= Procode(Edit1.Text,Length(Edit1.Text),Length(Edit1.Text) + 1);
    If ProtectoR = 'a' Then ProtectoR := 'A';
    If ProtectoR = 'b' Then ProtectoR := 'B';
    If ProtectoR = 'c' Then ProtectoR := 'C';
    If ProtectoR = 'd' Then ProtectoR := 'D';
    If ProtectoR = 'e' Then ProtectoR := 'E';
    If ProtectoR = 'f' Then ProtectoR := 'F';
    If ProtectoR = 'g' Then ProtectoR := 'G';
    If ProtectoR = 'h' Then ProtectoR := 'H';
    If ProtectoR = 'i' Then ProtectoR := 'I';
    If ProtectoR = 'j' Then ProtectoR := 'J';
    If ProtectoR = 'k' Then ProtectoR := 'K';
    If ProtectoR = 'l' Then ProtectoR := 'L';
    If ProtectoR = 'm' Then ProtectoR := 'M';
    If ProtectoR = 'n' Then ProtectoR := 'N';
    If ProtectoR = 'o' Then ProtectoR := 'O';
    If ProtectoR = 'p' Then ProtectoR := 'P';
    If ProtectoR = 'q' Then ProtectoR := 'Q';
    If ProtectoR = 'r' Then ProtectoR := 'R';
    If ProtectoR = 's' Then ProtectoR := 'S';
    If ProtectoR = 't' Then ProtectoR := 'T';
    If ProtectoR = 'u' Then ProtectoR := 'U';
    If ProtectoR = 'v' Then ProtectoR := 'V';
    If ProtectoR = 'w' Then ProtectoR := 'W';
    If ProtectoR = 'x' Then ProtectoR := 'X';
    If ProtectoR = 'y' Then ProtectoR := 'Y';
    If ProtectoR = 'z' Then ProtectoR := 'Z';
    Edit2.Text := Edit2.Text + ProtectoR;

    -> Mude as letras Maiusculas pelas letras diferentes


    No evento onclick do Button coloque:


    Code


    Edit1.Clear;
    Edit2.Clear; //para limpar os campos

      Data/hora atual: Seg Abr 29, 2024 12:31 pm