Ir para conteúdo
Fórum Script Brasil

Progr'amador

Veteranos
  • Total de itens

    1.130
  • Registro em

  • Última visita

Tudo que Progr'amador postou

  1. Olá robson, Use a função FormatFloat. Edit1.text := FormatFloat('0.00',resultado); Abs. Progr'amador. ;)
  2. Olá Valdecir, nessa linha: você está usando FALSE, e na verdade seria TRUE acho que o Thales não observou isso em todo caso se não funcionar no Planeta Delphi tem um componente que faz isso. só que você tem se registrar, e vai na opção Pesquisa e digite exatamente: Iniciar sua aplicacao ao logon do windows, que vai te trazer o componente. Abs. Progr'amador.
  3. :angry: O cara não tem nada pra fazer e fica postando spam neste tópico, já deletei um monte e o cara continua postando, vou ter que fechar...
  4. Olá Halfar, Quanto ao pontinho: São os tópicos onde tem seus posts. Abs. Progr'amador.
  5. Opa achei mais um "errinho" 22:00 = vinte e dois horas corrigindo somente a function DecimalExtenso (com sua permissão sem pedir :) ) ficaria assim: function DecimalExtenso(Num :integer; Masculino :Boolean) :string; var Unidade, Dezena :integer; begin if Num > 0 then begin Unidade := Num mod 10; Dezena := Num div 10; if Dezena = 0 then begin if Unidade <= 2 then // Os números 1 e 2 podem variar em gênero Result := cnUnidadeGenero[Unidade +(Byte(Masculino)*2)] else Result := cnUnidade[Unidade] end else if Unidade = 0 then Result := cnDezena[Dezena] else if Dezena = 1 then Result := cnDezena10[Num] else if Dezena <= 9 then if Unidade <= 2 then // Os números 1 e 2 podem variar em gênero Result := cnDezena[Dezena] + ' e ' +cnUnidadeGenero[Unidade +(Byte(Masculino)*2)] else Result := cnDezena[Dezena] + ' e ' +cnUnidade[Unidade]; end else Result := 'zero'; end; Abs. Progr'amador.
  6. Agora ficou 10!!! bem redondinho! vai ver agora, seria a mesma coisa que o Thales iria fazer. :D P.S. só uma coisinha... se digitar 24:00 da erro de hora inválida, não aceita cima disso, mas ai é o compilador que não reconhece esse horário, que na verdade seria 00:00. Abs. Progr'amador.
  7. vagner, Explique-se melhor, dessa forma é dificil de alguém ajudar, o que seria esse add??? seria tipo IBQuery.SQL.Add(...????? posta seu código aí, falou! Abs. Progr'amador.
  8. Fechado. tópico repetido http://scriptbrasil.com.br/forum/index.php?showtopic=88273 Abs. Progr'amador.
  9. Olá Fernando, Pra acessar você pode usar o BDE, criando um Alias do tipo STANDARD, setando para o pasta (diretório) onde se encontra esse arquivo DBF DBF = extensão de tabela do dBASE P.S. você se cadastrou duas vezes???? :blink: Abs. Progr'amador.
  10. Olá Paulo, Posso entrar na conversa?! O s3c realmente sabe tudo, o cara é fera mesmo!!! :) Quanto ao uso, seria assim: type TForm2 = class(TForm) procedure CreateParams(var Params: TCreateParams); override; private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation procedure TForm2.CreateParams(var Params: TCreateParams); begin inherited CreateParams(Params); Params.WndParent := 0; end; Abs. Progr'amador.
  11. É o Micheus poderia postar isso em Dicas e Tutoriais, By Micheus :D Abs. Progr'amador.
  12. Opa!!! está com alguns bugs aí!! :P observe os exemplos: 01:01 = um horas e um minutos 01:00 = zero horas e sessenta minutos :blink: :o 02:00 = um horas e sessenta minutos :blink: :o dois horas, melhor => duas horas um horas, melhor => uma hora etc... etc... etc... é coisinha boba :P Abs. Progr'amador.
  13. Progr'amador

    Chave Estrageira

    Olá, No Create Table depois dos campos, coloque: FOREIGN KEY (LT_NUM_LOTE) REFERENCES ANIMAL(LT_NUM_LOTE) Abs. Progr'amador.
  14. Olá Paulo, É o FormatFloat, a mesma coisa que: Label2.Caption := FormatFloat('#.00',Valor); Abs. Progr'amador.
  15. Ueh!!! :mellow: foi o que eu entendi! foi mal! -_-
  16. Olá schaukoski, O Delphi 7, tem o componete XPManifest na paleta Win32 é só incluir no seu form principal, ou então basta incluir XPMan no Uses desse form principal e pronto todos seus buttons, edits, etc, TUDO vai ficar no modo XP . Abs. Progr'amador.
  17. :blink: Ok, Como diz um ditado: Pra kê simplificar se dá pra complicar! :rolleyes: :P brincadeirinha..., o importante é seu problema resolvido. Abs. Progr'amador. B)
  18. Progr'amador

    Mysql Em Rede

    Ola Thayse, Abra o MySQL Server Instance Config e remova a configuração e configure novamente com as opções abaixo: - Dedicated MySQL Server Machine - Non-Transactional Database Only - Online Transaction Processing (OLTP) - Enable TPC/IP Networking - Enable Strict Mode - Standard Character Set - Install As Windows options - Include Bin Directory in windows Path - senha do root - Enable root access from remote machines Abs. Progr'amador.
  19. Olá Rodrigo_lombras, tenta isso: SELECT MAX(ID), COD, EST FROM TABELA GROUP BY COD Abs. Progr'amador.
  20. Olá Meu amigo Visitante, O Seu unico problema, é declarar Windows no Uses. A função Sleep pertence a essa biblioteca Windows sem ela não funciona. Substitua TODO o seu código por esse que Thales postou por último. Abs. Progr'amador.
  21. Olá, Achei na net o componente FloatEdit, o nome já diz tudo!, o negosso é que ele erra pra delphi2 e eu fiz umas alterações, para ser instalado nas versões 6 em diante. unit FloatEdit; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TFloatEdit = class(TEdit) private { Private-Deklarationen } FDigits : byte; FMin,FMax : extended; fdec : char; Fertext : string; foldval : extended; protected { Protected-Deklarationen } procedure setvalue(Newvalue : extended); procedure setmin(Newvalue : extended); procedure setmax(Newvalue : extended); procedure setdigits(Newvalue : byte); function getvalue : extended; procedure KeyPress(var Key: Char); override; procedure doexit;override; procedure doEnter;override; public { Public-Deklarationen } published { Published-Deklarationen } property Digits : byte read FDigits write setDigits; property Value : extended read getvalue write setValue; property Min : extended read Fmin write setMin; property Max : extended read Fmax write setmax; property ErrorMessage :string read fertext write fertext; constructor create (aowner : TComponent);override; end; procedure Register; const notext = '[No Text]'; implementation constructor TFloatEdit.create (aowner : TComponent); begin inherited create(aowner); fdec := decimalseparator; fdigits := 1; fmin := 0; fmax := 99999999.9; fertext := notext; setvalue(0.0); end; procedure Register; begin RegisterComponents('Samples', [TFloatEdit]); end; procedure tfloatedit.doenter; begin foldval:=getvalue; inherited; end; procedure TFloatedit.doexit; var ts : string; result:extended; begin ts := text; inherited; try result := strtofloat(ts); except if fertext <> notext then showmessage(fertext); setvalue(foldval); selectall; setfocus; exit; end; if (result < fmin) or (result > fmax) then begin if fertext <> notext then showmessage(fertext); setvalue(foldval); selectall; setfocus; exit; end; // Ausgabe formatieren text := floattostrf(result,fffixed,18,fdigits); value:=strtofloat(text); inherited; end; procedure TFloatedit.setvalue(Newvalue : extended); var tmp : string; begin if newvalue > fmax then begin if fertext <> notext then showmessage(fertext); newvalue := fmax; end; if newvalue < fmin then begin if fertext <> notext then showmessage(fertext); newvalue := fmin; end; tmp := floattostrf(newvalue,fffixed,18,fdigits); text:=tmp; end; function TFloatedit.getvalue : extended; var ts : string; begin ts := text; if (ts = '-') or (ts = fdec) or (ts = '') then ts := '0'; try result := strtofloat(ts); except //if fertext <> notext then showmessage(fertext); result := fmin; end; if result < fmin then begin //if fertext <> notext then showmessage(fertext); result := fmin; end; if result > fmax then begin //if fertext <> notext then showmessage(fertext); result := fmax; end; end; procedure TFloatedit.setdigits; begin if fdigits <> newValue then begin if newvalue > 18 then newvalue := 18; fdigits := newvalue; setvalue(getvalue); end; end; procedure TFloatedit.setmin; begin if fmin <> newValue then begin if fmin > fmax then begin showmessage('Min-Value has to be less than or equal to Max-Value !'); newvalue := fmax; end; fmin := newvalue; setvalue(getvalue); end; end; procedure TFloatedit.setmax; begin if fmax <> newValue then begin if fmin > fmax then begin showmessage('Max-Value has to be greater than or equal to Min-Value !'); newvalue := fmin; end; fmax := newvalue; setvalue(getvalue); end; end; procedure TFloatedit.keypress; var ts : string; result : extended; begin if key = #27 then begin setvalue(foldval); selectall; inherited; exit; end; if key < #32 then begin inherited; exit; end; ts := copy(text,1,selstart)+copy(text,selstart+sellength+1,500); if (key <'0') or (key > '9') then if (key <> fdec) and (key <> '-') then begin inherited; key := #0; exit; end; if key = fdec then if pos(fdec,ts) <> 0 then begin inherited; key := #0; exit; end; if key = '-' then if pos('-',ts) <> 0 then begin inherited; key := #0; exit; end; if key = '-' then if fmin >= 0 then begin inherited; key := #0; exit; end; if key = fdec then if fdigits = 0 then begin inherited; key := #0; exit; end; // seltext durch key ersetzen ts := copy(text,1,selstart)+key+copy(text,selstart+sellength+1,500); // Überprüfen, ob gültiger wert; if key > #32 then if pos(fdec,ts)<> 0 then begin if length(ts)-pos(fdec,ts) > fdigits then begin inherited; key := #0; exit; end; end; if key = '-' then if pos('-',ts) <> 1 then begin inherited; key := #0; exit; end; if ts ='' then begin inherited;key := #0; text := floattostrf(fmin,fffixed,18,fdigits);selectall; exit; end; if ts = '-' then begin inherited;key:=#0; text := '-0';selstart := 1;sellength:=1; exit; end; if ts = fdec then begin inherited;key:=#0; text := '0'+fdec+'0'; selstart :=2; sellength:=1; exit; end; inherited; end; end. Abs. Progr'amador. ;)
  22. Ops! Declare Windows no uses, mas é estranho não seria esse o erro. :huh: Abs. Progr'amador.
  23. Olá rochajl vê se esse LINK funciona, é um componente TEdit (TFloatEdit) que só aceita número Real. aqui num abre porque os sites do yahoo são bloqueados. Mas quando eu trabalhava numa outra empresa eu baixei um desse. Abs. Progr'amador.
  24. Progr'amador

    Ajudem-me!

    você pode criar a procedure direto dentro do implementation dessa forma sim procedure teste; sem precisar declarar la em cima (depois do TForm1 = class(TForm), ou em private ou public) Não há problema nisso. Agora o melhor seria se você postasse sua unit para ver o problema.
×
×
  • Criar Novo...