Unconfigured Ad Widget

Collapse

Anúncio

Collapse
No announcement yet.

Ajuda simples mais eu ñ sei kkkk

Collapse
X
 
  • Filter
  • Tempo
  • Show
Clear All
new posts

  • Font Size
    #1

    Delphi Ajuda simples mais eu ñ sei kkkk

    galera
    pode me ajudar em uma parada aki no delphi
    tipo
    em um edit1.text tem: @@@ (#####) aí eu queria colocar em outro edit só oq ta entre os parentese tipo #####
    quem puder me ajudar agradeço
    vlw galera

  • Font Size
    #2
    Se você não estiver brincando... Se for o que entendi é so copiar e colar oO. se não foi isso que entendi porr favor explique melhor para que possa lhe ajudar...

    Comment


    • Font Size
      #3
      tipo no edit1.text esta escrito nele "fdsfhsdj(ok)dfdsfdfdfd" então queria passar pra o edit2.text só oq esta entre parentese, q no caso é o "ok" entendeu???
      vlw

      Comment


      • Font Size
        #4
        Galera vamo ajudar o povo:
        adicione a unit StdCtrls
        aí a função:

        unit Unit1;

        interface

        uses
        Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
        Dialogs, StdCtrls;

        type
        TForm1 = class(TForm)
        Edit1: TEdit;
        Edit2: TEdit;
        Button1: TButton;
        Label1: TLabel;
        procedure Button1Click(Sender: TObject);
        private
        { Private declarations }
        public
        { Public declarations }
        end;

        var
        Form1: TForm1;

        implementation

        {$R *.dfm}

        function TextoEntre(Texto, Delimitador1,
        Delimitador2: String; CaseSensitive : boolean = false): string;
        var Inicio, Fim : Integer;
        Saida : string;
        begin
        // Passar o texto para variável temporária
        Saida := Texto;
        // Verificar se é sensível ao caso
        // Pegar o início
        if CaseSensitive then
        Inicio := Pos(Delimitador1, Saida)
        else
        Inicio := Pos(ansiUpperCase(Delimitador1), ansiLowerCase(Saida));
        // Verificar se localizou
        if Inicio > 0 then
        Saida := Copy(Saida, Inicio + Length(Delimitador1), Length(Saida));

        // Pegar o fim
        if CaseSensitive then
        Fim := Pos(Delimitador2, Saida)
        else
        Fim := Pos(ansiUpperCase(Delimitador2), ansiUpperCase(Saida));

        // Verificar se localizou
        if Fim > 0 then
        Saida := Copy(Saida, 1, Fim - 1);

        // retornar o resultado
        Result := Saida;
        end;

        procedure TForm1.Button1Click(Sender: TObject);
        VAR textoedit2:string;
        begin
        textoedit2:= TextoEntre(Edit1.Text, '(', ')');
        edit2.text:=textoedit2;

        end;

        end.

        Comment


        • Font Size
          #5
          Exatamente isso.
          Vc É o cara.
          BrigadÃo.
          Vlw.

          Comment

          X
          Working...
          X