-
Total de itens
9.657 -
Registro em
Tudo que Jhonas postou
-
Fiz um teste assim e está funcionando procedure TForm1.Button1Click(Sender: TObject); var IntX : integer; begin Query2.Active := false; ClientDataSet2.Active := false; Query2.Active := true; ClientDataSet2.Active := true; for IntX:= 1 to StringGrid1.RowCount -1 do begin ClientDataSet2.Append; ClientDataSet2.Edit; ClientDataSet2.FieldByName('campoA').Value:= StringGrid1.Cells[0,IntX]; ClientDataSet2.FieldByName('campoB').Value:= StringGrid1.Cells[1,IntX]; ClientDataSet2.FieldByName('campoC').Value:= StringGrid1.Cells[2,IntX]; ClientDataSet2.FieldByName('campoD').Value:= StringGrid1.Cells[3,IntX]; ClientDataSet2.FieldByName('campoE').Value:= StringGrid1.Cells[4,IntX]; ClientDataSet2.Post; ClientDataSet2.ApplyUpdates(); end; end; abraço
-
Criando um arquivo autorun.inf http://www.oficinadanet.com.br/artigo/1077...ivo_autorun.inf abraço
-
Primeiro veja se no Setup da BIOS tem a opção de alterar a configuração ... se tiver é só mudar, salvar e reiniciar o micro Se não tiver, talvez seja necessario fazer um UPDATE da BIOS. http://www.guiadohardware.net/comunidade/a...ar-bios/173726/ abraço
-
É bem simples ... veja procedure TForm1.Button1Click(Sender: TObject); begin Edit1.Text := FormatFloat('0',StrToFloat(Edit1.Text)); end; abraço
-
Registro não encontrado ou chamado por outro usuario voce deverá ter pelo menos um registro no combobox .. voce poderá tentar usar o DBCombobox no lugar do Combobox abraço
-
Só a palavra funcionario não, porque o comando não separa palavras spMorador.Font.Style := [fsBold]; abraço
-
(Resolvido) Artigo sobre Biometria...
pergunta respondeu ao Daniel Sanches de Jhonas em Delphi, Kylix
Artigo: http://www.forumpcs.com.br/coluna.php?b=149332 Download da Dll ou componente ActiveX ( Delphi 6 - 7 ) http://www.griaulebiometrics.com/page/pt-br/downloads abraço -
(Resolvido) Artigo sobre Biometria...
pergunta respondeu ao Daniel Sanches de Jhonas em Delphi, Kylix
Veja http://www.mercashop.com.br/produtos/0,458...IA-ECF-PDV.html http://www.vivaolinux.com.br/artigo/Como-f...m-estudo-geral/ http://www.testech.com.br/View.asp?codigo=...mp;cod_secao=24 abraço -
(Resolvido) Artigo sobre Biometria...
pergunta respondeu ao Daniel Sanches de Jhonas em Delphi, Kylix
Veja http://scriptbrasil.com.br/forum/index.php...st&p=537308 http://scriptbrasil.com.br/forum/index.php...st&p=510224 abraço -
(Resolvido) Copiar tabela informando o caminho do executável
pergunta respondeu ao Gabriel Cabral de Jhonas em Delphi, Kylix
Menssagem : Tabela em Uso Eu coloquei c:\ para mostrar a voce, que se, os arquivos não estiverem no caminho do executavel, voce terá que procurá-los primeiro e informar o caminho onde eles foram achados. ( Tem que construir uma rotina para procurar como é feita pelo windows ) Acho que o componente TFindFile vai te ajudar http://delphi.about.com/od/vclwriteenhance/a/tfindfile.htm exemplo usando o componente uses FindFile; ... procedure TfrMain.Button2Click(Sender: TObject); var FFile : TFindFile; begin FFile := TFindFile.Create(nil); try FFile.FileAttr := [ffaAnyFile]; FFile.InSubFolders := True; FFile.Path := ExtractFilePath(ParamStr(0)); FFIle.FileMask := '*.pas'; Memo1.Lines := FFile.SearchForFiles; finally FFile.Free; end; end; exemplo completo Download do componente http://delphi.about.com/library/tfindfile.zip http://www.delphiarea.com/?dl_id=8 {Article: TFindFile - Delphi Component Tired of using FindFirst, Next and Close? Come see how to encapsulate all those functions in a single "find-files-recursively" component. It's easy to use, free and with code. For the .pas file of this component click here. } unit FindFile; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, FileCtrl; type TFileAttrKind = (ffaReadOnly, ffaHidden, ffaSysFile, ffaVolumeID, ffaDirectory, ffaArchive, ffaAnyFile); TFileAttr = set of TFileAttrKind; TFindFile = class(TComponent) private s : TStringList; fSubFolder : boolean; fAttr: TFileAttr; fPath : string; fFileMask : string; procedure SetPath(Value: string); procedure FileSearch(const inPath : string); public constructor Create(AOwner: TComponent); override; destructor Destroy; override; function SearchForFiles: TStringList; published property FileAttr: TFileAttr read fAttr write fAttr; property InSubFolders : boolean read fSubFolder write fSubFolder; property Path : string read fPath write SetPath; property FileMask : string read fFileMask write fFileMask; end; procedure Register; implementation procedure Register; begin RegisterComponents('About.com', [TFindFile]); end; constructor TFindFile.Create(AOwner: TComponent); begin inherited Create(AOwner); Path := IncludeTrailingBackslash(GetCurrentDir); FileMask := '*.*'; FileAttr := [ffaAnyFile]; s := TStringList.Create; end; destructor TFindFile.Destroy; begin s.Free; inherited Destroy; end; procedure TFindFile.SetPath(Value: string); begin if fPath <> Value then begin if Value <> '' then if DirectoryExists(Value) then fPath := IncludeTrailingBackslash(Value); end; end; function TFindFile.SearchForFiles: TStringList; begin s.Clear; try FileSearch(Path); finally Result := s; end; end; procedure TFindFile.FileSearch(const InPath : string); var Rec : TSearchRec; Attr : integer; begin Attr := 0; if ffaReadOnly in FileAttr then Attr := Attr + faReadOnly; if ffaHidden in FileAttr then Attr := Attr + faHidden; if ffaSysFile in FileAttr then Attr := Attr + faSysFile; if ffaVolumeID in FileAttr then Attr := Attr + faVolumeID; if ffaDirectory in FileAttr then Attr := Attr + faDirectory; if ffaArchive in FileAttr then Attr := Attr + faArchive; if ffaAnyFile in FileAttr then Attr := Attr + faAnyFile; if SysUtils.FindFirst(inPath + FileMask, Attr, Rec) = 0 then try repeat s.Add(inPath + Rec.Name); until SysUtils.FindNext(Rec) <> 0; finally SysUtils.FindClose(Rec); end; If not InSubFolders then Exit; if SysUtils.FindFirst(inPath + '*.*', faDirectory, Rec) = 0 then try repeat if ((Rec.Attr and faDirectory) <> 0) and (Rec.Name<>'.') and (Rec.Name<>'..') then begin FileSearch(IncludeTrailingBackslash(inPath + Rec.Name)); end; until SysUtils.FindNext(Rec) <> 0; finally SysUtils.FindClose(Rec); end; end; end. { ******************************************** Zarko Gajic About.com Guide to Delphi Programming [url=http://delphi.about.com]http://delphi.about.com[/url] email: delphi.guide@about.com free newsletter: [url=http://delphi.about.com/library/blnewsletter.htm]http://delphi.about.com/library/blnewsletter.htm[/url] forum: [url=http://forums.about.com/ab-delphi/start/]http://forums.about.com/ab-delphi/start/[/url] ******************************************** abraço -
Use então 1 query, 1 DataSetProvider, 1 ClientDataSet e 1 DataSource procedure TForm1.Button1Click(Sender: TObject); var IntX : integer; begin Query2.Active := false; ClientDataSet2.Active := false; Query2.Active := true; ClientDataSet2.Active := true; for IntX:= 1 to StringGrid1.RowCount -1 do begin ClientDataSet2.Append; ClientDataSet2.Edit; ClientDataSet2.FieldByName('campo').Value:= 0; ClientDataSet2.Post; ClientDataSet2.ApplyUpdates(); end; end; OBS: procure sempre usar este jogo de componentes object Query1: TQuery object ClientDataSet1: TClientDataSet object DataSetProvider1: TDataSetProvider object DataSource1: TDataSource ou object IBQuery1: TIBQuery object ClientDataSet1: TClientDataSet object DataSetProvider1: TDataSetProvider object DataSource1: TDataSource abraço
-
O que é usado para formatar o pendrive é HPUSBFW.EXE este é HPUSBF.EXE ... usado para recuperar o seu pendrive e as informações contidas nele abraço
-
Deixe a propriedade RequestLive = true abraço
-
procure este evento dentro do componente ... OnDrawPanel é só colocar o codigo lá dentro e criar os panels e mudar a propriedade Style = psOwnerDraw para cada panel abraço
-
(Resolvido) Copiar tabela informando o caminho do executável
pergunta respondeu ao Gabriel Cabral de Jhonas em Delphi, Kylix
experimente esse exemplo procedure TForm1.Button1Click(Sender: TObject); var buffer: array [0..255] of char; FileToFind: string; FileToFindA: string; begin GetWindowsDirectory(buffer, SizeOf(buffer)); FileToFind := FileSearch(Edit1.Text, 'C:\' + ';' + buffer); if FileToFind = '' then ShowMessage('Não Econtrado ' + Edit1.Text + '.') else begin ShowMessage('Encontrado ' + FileToFind + '.'); DeleteFile(PChar(FileToFind)); end; FileToFindA := FileSearch(Edit2.Text, 'C:\' + ';' + buffer); if FileToFindA = '' then ShowMessage('Não Econtrado ' + Edit2.Text + '.') else begin ShowMessage('Encontrado ' + FileToFindA + '.'); CopyFile(PChar(FileToFindA), PChar(FileToFindA+'X'), True); end; end; OBS: quando não funciona é porque o caminho do arquivo não foi encontrado abraço -
Para salvar o seu pendrive sem perder nada http://www.4shared.com/file/53784679/b8f52873/HPUSBFEXE.html abraço
-
Outra soluçao é guardar em uma tabela ( a data para que um determinado aviso apareça ) comparando com a data do sistema ... entretanto o seu sistema terá que estar sendo iniciado juntamente com o windows abraço
-
(Resolvido) Copiar tabela informando o caminho do executável
pergunta respondeu ao Gabriel Cabral de Jhonas em Delphi, Kylix
Voce deve levar em conta que se a tabela dbf estiver sendo usada, isso realmente não funciona ... a tabela deveria estar fechada para poder funcionar abraço -
Eu não tenho como postar uma imagem aqui .... me de o seu email que te envio em um de meus sistemas estou usando 18 TabSheets sem problemas e sem confusão ... e todos fazem parte da mesma Ordem de Serviços Eu costumo usar assim: read_committed rec_version sobre a opção nowait veja: abraço
-
(Resolvido) Select com data Delphi + Access
pergunta respondeu ao João Paulo Taraciuk de Jhonas em Delphi, Kylix
Acho que voce terá que fazer uma conversão de tipos exemplo: procedure TForm1.Button1Click(Sender: TObject); var s, s1 : string; begin s := formatdatetime('mm/dd/yyyy', StrToDate(MaskEdit1.Text)); s1:= formatdatetime('mm/dd/yyyy', StrToDate(MaskEdit2.Text)); Query1.Active := false; Query1.SQL.Clear; Query1.SQL.append('SELECT * FROM Produtos ' + 'WHERE DATA BETWEEN ' + '''' + s + '''' + ' AND ' + '''' + s1 + '''' ); showmessage(Query1.SQL.Text); // usado para verificar se a instrução está correta Query1.Active := true; end; Acho que dessa maneira resolve abraço -
(Resolvido) Copiar tabela informando o caminho do executável
pergunta respondeu ao Gabriel Cabral de Jhonas em Delphi, Kylix
Veja primeiro se consegue encontrar o arquivo procedure TForm1.Button2Click(Sender: TObject); var buffer: array [0..255] of char; FileToFind: string; begin GetWindowsDirectory(buffer, SizeOf(buffer)); FileToFind := FileSearch(Edit1.Text, ExtractFilePath(Application.ExeName) + ';' + buffer); if FileToFind = '' then ShowMessage('Não Econtrado ' + Edit1.Text + '.') else ShowMessage('Encontrado ' + FileToFind + '.'); end; Se conseguir encontrar o arquivo procurado, então fica mais facil montar a sua rotina abraço -
Exatamente ... e voce verá que fica mais facil fazer o controle ( a lógica fica um pouco diferente mas muito pratico ) abraço
-
exemplo: procedure TForm1.Button1Click(Sender: TObject); var i : integer; begin for i := 1 to StringGrid1.RowCount-1 do begin //CDS_Ms.Last; CDS_Ms.Append; CDS_Ms.Edit; CDS_MsCampoA.Value := StringGrid1.Cells[0,i]; CDS_MsCampoB.Value := StringGrid1.Cells[1,i]; CDS_MsCampoC.Value := StringGrid1.Cells[2,i]; CDS_MsCampoD.Value := StringGrid1.Cells[3,i]; CDS_MsCampoE.Value := StringGrid1.Cells[4,i]; CDS_MsCampoF.Value := StringGrid1.Cells[5,i]; CDS_MsCampoG.Value := StringGrid1.Cells[6,i]; CDS_MsCampoH.Value := StringGrid1.Cells[7,i]; CDS_MsCampoI.Value := StringGrid1.Cells[8,i]; CDS_MsCampoJ.Value := StringGrid1.Cells[9,i]; CDS_Ms.Post; CDS_Ms.ApplyUpdates(-1); end; end; Para cada campo da tabela voce vai jogar o conteudo da celula ( Coluna , Linha ) abraço
-
consegue ... basta usar a popriedade Interval do Timer para definir o tempo 1000 corresponde a 1 segundo 60000 corresponde a 1 minuto 600000 corresponde a 10 minutos abraço
-
Mover barra de rolagem de varios grids simultaneamente
pergunta respondeu ao etspaz de Jhonas em Delphi, Kylix
OBS: Não use texto em caixa alta ( Não digite tudo maiusculo ... certo ? siga as regras do forum exemplo de barra de rolagem horizontal procedure TForm1.ScrollBar1Scroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); begin posicao := ScrollPos; Label1.Caption := inttostr(posicao); Label2.Caption := inttostr(ScrollBar1.Position); if ScrollBar1.Position < posicao then begin SendMessage(DBgrid1.Handle, WM_HSCROLL, SB_LINERIGHT, 0); SendMessage(DBgrid2.Handle, WM_HSCROLL, SB_LINERIGHT, 0); end else begin SendMessage(DBgrid1.Handle, WM_HSCROLL, SB_LINELEFT, 0); SendMessage(DBgrid2.Handle, WM_HSCROLL, SB_LINELEFT, 0); end; end; Voce deverá limitar o numero de rolagem do ScrollBar para não extrapolar a barra do dbgrid abraço