Ir para conteúdo
Fórum Script Brasil

Jhonas

Monitores
  • Total de itens

    9.657
  • Registro em

Tudo que Jhonas postou

  1. como eu disse a resposta esta aqui... pelo menos tente descobrir a lógica do processo // add nodes procedure TForm1.Button1Click(Sender: TObject); var i : Integer; begin tree.Checkboxes := True; for i := 0 to 10 do tree.Items.AddChild(nil, 'Treenode number ' + IntToStr(i)); end; procedure TForm1.Button2Click(Sender: TObject); var node : TTreeNode; b : Boolean; begin node := tree.Items.GetFirstNode; while node <> nil do begin tree.Checked[node] := (not tree.Checked[node]); node := node.getNextSibling; end; end; abraço
  2. voce pode experimentar esse código uses winsock; function GetLocalIP : string; type TaPInAddr = array [0..10] of PInAddr; PaPInAddr = ^TaPInAddr; var phe : PHostEnt; pptr : PaPInAddr; Buffer : array [0..63] of char; I : Integer; GInitData : TWSADATA; begin WSAStartup($101, GInitData); Result := ''; GetHostName(Buffer, SizeOf(Buffer)); phe :=GetHostByName(buffer); if phe = nil then Exit; pptr := PaPInAddr(Phe^.h_addr_list); I := 0; while pptr^[I] <> nil do begin result:=StrPas(inet_ntoa(pptr^[I]^)); result := StrPas(inet_ntoa(pptr^[I]^)); Inc(I); end; WSACleanup; end; ou faça uma pesquisa no forum pela palavra descobrir ip abraço
  3. é estranho ... pois daria erro ao chamar as funções da sua dll então é melhor verificar se realmente o seu programa esta chamando a sua dll abraço
  4. Faça uma pesquisa no forum http://scriptbrasil.com.br/forum/index.php...highlite=upload abraço
  5. não dá pra saber em qual evento voce colocou o código abraço
  6. ajudo no que posso ... rs O tipo AnsiString é usado para concatenar sucessões de carácteres, como orações ou sentenças. Cada carácter é um AnsiChar, que tem 8 bits de tamanho. Um AnsiString pode concatenar qualquer número de carácteres, só restringido pelo tamanho da memória. Essa é uma mudança feita a partir do delphi 2009 abraço
  7. Bem, vamos tentar mais uma vez p:= 'd:\sample.bmp'; SendMessage(CaptureWindow, WM_CAP_SAVEDIB, 0, LongInt(PAnsiChar(AnsiString(p)))); abraço
  8. É possivel sim ... voce tem duas maneiras de fazer isso: antes do preview do report ou no evento BeforePrint do quick report lembre-se que o masterdetail deve ter a tabela principal e para os demais registros linkados pelo Inner Join voce deve usar um QRChildBand1 para saber se a sua instrução select esta funcionando, use um dbgrid para mostrar os registros selecionados abraço
  9. exemplo: procedure TForm1.Button1Click(Sender: TObject); var SR: TSearchRec; I: integer; Origem, Destino: string; begin I := FindFirst('c:\E*.*', faAnyFile, SR); // c:\Origem while I = 0 do begin if (SR.Attr and faDirectory) <> faDirectory then begin Origem := 'c:\Origem' + SR.Name; Destino := 'c:\Destino' + SR.Name; if not CopyFile(PChar(Origem), PChar(Destino), false) then ShowMessage('Erro ao copiar ' + Origem + ' para ' + Destino); end; I := FindNext(SR); end; end; ou procedure TForm1.Button1Click(Sender: TObject); var SR: TSearchRec; I: integer; Origem, Destino: string; begin I := FindFirst('c:\E*.DBF', faAnyFile, SR); // c:\Origem while I = 0 do begin if (SR.Attr and faDirectory) <> faDirectory then begin Origem := 'c:\Origem' + SR.Name; Destino := 'c:\Destino' + SR.Name; if not CopyFile(PChar(Origem), PChar(Destino), false) then ShowMessage('Erro ao copiar ' + Origem + ' para ' + Destino); end; I := FindNext(SR); end; end; abraço
  10. Faça uma pesquisa no forum http://scriptbrasil.com.br/forum/index.php...te=quick+report abraço
  11. veja o código do exemplo ... a resposta está lá abraço
  12. mas alguns clientes ela só esta mostrando metade do telefone OBS: o campo deve ser numerico exemplo: DBEdit1.Field.EditMask:= '!\(99\)0000-0000;1;_'; // mascara de Edição você deve colocar a mesma mascara na propriedade DisplayMask do campo (no field editor da table ou query) // para visualização (9 para numeros não obrigatorios e 0 para obrigatórios) abraço
  13. faça outro teste Var s : string; s := 'd:\sample.bmp'; SendMessage(CaptureWindow, WM_CAP_FILE_SAVEDIB, 0, longint(PAnsichar(s))); se funcionar, coloque todo o caminho na variavel s e tente novamente abraço
  14. voce não consegue usar esse comando porque o foco não está no seu programa e sim em outro lugar ( no caso o word ) tem jeito de fazer isso ... como é feito no outlook quando esta minimizado e voce recebe uma mensagem, mas agora não posso parar o meu serviço para verificar isso ... quem sabe outro colega do forum possa ajudá-lo abraço
  15. nesse exemplo, quando o usuário marca um nó filho, o nó pai deve ser marcado automaticamente procedure TForm1.JvCheckTreeView1Toggled(Sender: TObject; Node: TTreeNode); var nFilho, nAnt, nPai: TTreeNode; begin if TJvCheckTreeView(sender).Checked[node] then begin nFilho := Node; nPai := nFilho.GetPrev; nAnt := nPai; if (nPai <> nil) and (nFilho.HasAsParent(nPai)) then begin TJvCheckTreeView(sender).Checked[nPai] := True; end else begin while ((not nFilho.HasAsParent(nPai)) or (not nAnt.HasAsParent(nPai))) and (nPai <> nil) do begin nAnt := nPai; nPai := nAnt.GetPrev; end; end; if (nPai <> nil) and (nFilho.HasAsParent(nPai)) then TJvCheckTreeView(sender).Checked[nPai] := True; end; neste exemplo, voce pode checar o estado dos nós unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, JvExComCtrls, JvComCtrls, JvCheckTreeView, ImgList; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; tree: TJvCheckTreeView; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} // add nodes procedure TForm1.Button1Click(Sender: TObject); var i : Integer; begin tree.Checkboxes := True; for i := 0 to 10 do tree.Items.AddChild(nil, 'Treenode number ' + IntToStr(i)); end; procedure TForm1.Button2Click(Sender: TObject); var node : TTreeNode; b : Boolean; begin node := tree.Items.GetFirstNode; while node <> nil do begin tree.Checked[node] := (not tree.Checked[node]); node := node.getNextSibling; end; end; end. abraço
  16. se eu colocar direto SendMessage(CaptureWindow, WM_CAP_FILE_SAVEDIB, 0, longint(PAnsichar('d:\sample.bmp'))); ele grava então tente assim: SendMessage(CaptureWindow, WM_CAP_FILE_SAVEDIB, 0, longint(PAnsichar(path) + PAnsichar('\sample.bmp'))); abraço
  17. a resposta esta nesse link http://www.devmedia.com.br/forum/viewtopic.asp?id=357058 abraço
  18. ok... a função dentro da dll é esta function capFileSaveDIB(Handle: HWND; szName: PChar): integer; begin Result := sendmessage(handle, WM_CAP_FILE_SAVEDIB, 0, integer(szName)); end; portanto ao chamar a função, temos: SendMessage(CaptureWindow, WM_CAP_FILE_SAVEDIB, 0, longint(PAnsichar('c:\temp\sample.bmp')),1); OBS: o erro é de conversão de tipos .... eu uso o componente DSPack para capturar imagem da webcam de qualquer modo veja: {PASCAL INTERFACE for AVICAP32 DLL} http://hi.baidu.com/sunlovestar/blog/item/...4779f05575.html abraço
  19. Este é o código do TJvCheckTreeView veja com calma, qual evento do componente voce poderá usar para fazer isso {----------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: JvCheckTreeView.PAS, released on 2003-06-22. The Initial Developer of the Original Code is Peter Th�rnqvist [peter3 at sourceforge dot net] Portions created by Peter Th�rnqvist are Copyright (C) 2003 Peter Th�rnqvist. All Rights Reserved. Contributor(s): You may retrieve the latest version of this file at the Project JEDI's JVCL home page, located at http://jvcl.sourceforge.net Known Issues: -----------------------------------------------------------------------------} // $Id: JvCheckTreeView.pas,v 1.17 2004/09/01 15:06:33 ahuser Exp $ unit JvCheckTreeView; {$I jvcl.inc} {$I vclonly.inc} // <- JvComCtrls interface uses Windows, Classes, ComCtrls, JvComCtrls, JvExComCtrls; type TJvTVCheckBoxStyle = (cbsNone, cbsNative, cbsJVCL); TJvTVCascadeOption = (poOnCheck, poOnUnCheck); TJvTVCascadeOptions = set of TJvTVCascadeOption; TJvTreeViewCheckBoxOptions = class(TPersistent) private FTreeView: TJvTreeView; FImageIndices: array[0..3] of Integer; FStyle: TJvTVCheckBoxStyle; FCascadeLevels: Integer; FCascadeOptions: TJvTVCascadeOptions; function GetImageIndex(const Index: Integer): Integer; procedure SetImageIndex(const Index, Value: Integer); procedure ChangeImage(OldIndex, NewIndex: Integer); procedure SetStyle(const Value: TJvTVCheckBoxStyle); public procedure Assign(Source: TPersistent); override; constructor Create; property TreeView: TJvTreeView read FTreeView; published // Style determines what type of checkboxes/radioitems are displayed in the treeview. Style can have one of the following values: // cbsNone - no checkboxes or radiobuttons are displayed. Works like a normal treeview // cbsNative - use MS implementation of checkboxes. With this option you can only display // checkboxes and not radioitems. You can't set up your own images using the StateImages/StateIndex properties // of the treeview since this is overriden by the MS implementation // cbsJVCL - use the custom JVCL style. With this option you can display any type of images // by setting up your own StateImages ImageList and change the index properties below // (see CheckBoxUncheckedIndex etc) property Style: TJvTVCheckBoxStyle read FStyle write SetStyle; // CascadeLevels controls how many levels down a check or uncheck of a checkbox is propagated // If CascadeLevels is -1, checks and unchecks are cascaded to all children recursively regardless of depth. // If CascadeLevels is 0 (the default), no propagation takes place. If CascadeLevels > 0, the check/uncheck is // propagated that number of levels (i.e if CascadeLevels = 2, checks will propagate 2 levels below // the currently selected node) // Note that this only works if Style = cbsJVCL! property CascadeLevels: Integer read FCascadeLevels write FCascadeLevels default 0; // CascadeOptions determines how propagation of checks/unchecks are performed. CascadeOptions is a // set that can contain a combination of the following values: // cbOnCheck - the checkbox state is propagated when the node is checked // cbOnUnCheck - the checkbox state is propagated when the node is unchecked // If both values are set, the checkbox state is always propagated (unless CascadeLevels = 0, of course) // Setting this property to an empty set is equivalent to setting CascadeLevels := 0, i.e no propagation property CascadeOptions: TJvTVCascadeOptions read FCascadeOptions write FCascadeOptions default [poOnCheck, poOnUnCheck]; // Use the properties below in combination with an imagelist assigned to the // Treeviews StateImages property to control what images are displayed for the various checkbox and radioitems states // The actual images used are of no significance. Rather, it is the index of the property that controls what happens when a node is // checked or unchecked: if the node has its StateIndex set to CheckBoxUncheckedIndex or CheckBoxCheckedIndex, it will be treated as // a checkbox, if the node has its StateIndex set to RadioUncheckedIndex or RadioCheckedIndex, it will be treated as a radioitem // Checkboxes are toggled on and off, possibly with propagation // RadioItems are only toggled on when "checked" and there is no propagation but all other radioitems on the same level will // automatically be toggled off. Note that if you don't set a specific radioitem on a level as checked, they will all be unhecked // until the user checks one of them // NB! the first used index in a StateImages imagelist is 1, not 0! The 0'th item is ignored by the underlying treeview, so // you will have to assign a dummy image as the first to make the imagelist work for you // CheckBoxUncheckedIndex is the index for the image in StateImages used for the unchecked checkbox state property CheckBoxUncheckedIndex: Integer index 0 read GetImageIndex write SetImageIndex default 1; // CheckBoxCheckedIndex is the index for the image in StateImages used for the checked checkbox state property CheckBoxCheckedIndex: Integer index 1 read GetImageIndex write SetImageIndex default 2; // RadioUncheckedIndex is the index for the image in StateImages used for the unchecked radioitem state property RadioUncheckedIndex: Integer index 2 read GetImageIndex write SetImageIndex default 3; // RadioCheckedIndex is the index for the image in StateImages used for the checked radioitem state property RadioCheckedIndex: Integer index 3 read GetImageIndex write SetImageIndex default 4; end; TJvCheckTreeView = class(TJvTreeView) private FCheckBoxOptions: TJvTreeViewCheckBoxOptions; FOnToggled: TTVChangedEvent; FOnToggling: TTVChangingEvent; function GetCheckBox(Node: TTreeNode): Boolean; function GetChecked(Node: TTreeNode): Boolean; function GetRadioItem(Node: TTreeNode): Boolean; procedure SetCheckBox(Node: TTreeNode; const Value: Boolean); procedure SetChecked(Node: TTreeNode; const Value: Boolean); procedure SetRadioItem(Node: TTreeNode; const Value: Boolean); procedure SetCheckBoxOptions(const Value: TJvTreeViewCheckBoxOptions); procedure InternalSetChecked(Node: TTreeNode; const Value: Boolean; Levels: Integer); protected procedure ToggleNode(Node: TTreeNode); virtual; procedure Click; override; procedure KeyDown(var Key: Word; Shift: TShiftState); override; procedure DoToggled(Node: TTreeNode); dynamic; function DoToggling(Node: TTreeNode): Boolean; dynamic; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; // get / set whether Node is checked property Checked[Node: TTreeNode]: Boolean read GetChecked write SetChecked; // get / set whether Node is a checkbox property CheckBox[Node: TTreeNode]: Boolean read GetCheckBox write SetCheckBox; // get / set whether Node is a radioitem property RadioItem[Node: TTreeNode]: Boolean read GetRadioItem write SetRadioItem; published // CheckBoxOptions controls the behavior of the checbox/radioitems in the treeview property CheckBoxOptions: TJvTreeViewCheckBoxOptions read FCheckBoxOptions write SetCheckBoxOptions; // called just before a node is to be toggled // NB! If you have activated propagation, this event will be called for *all* nodes affected by the propagation property OnToggling: TTVChangingEvent read FOnToggling write FOnToggling; // called just after a node has been toggled // NB! If you have activated propagation, this event will be called for *all* nodes affected by the propagation property OnToggled: TTVChangedEvent read FOnToggled write FOnToggled; end; implementation uses {$IFDEF UNITVERSIONING} JclUnitVersioning, {$ENDIF UNITVERSIONING} JvConsts; procedure ToggleTreeViewCheckBoxes(Node: TTreeNode; AUnChecked, AChecked, ARadioUnchecked, ARadioChecked: Integer); var Tmp: TTreeNode; begin if Assigned(Node) then begin if Node.StateIndex = AUnChecked then Node.StateIndex := AChecked else if Node.StateIndex = AChecked then Node.StateIndex := AUnChecked else if Node.StateIndex = ARadioUnchecked then begin Tmp := Node.Parent; if not Assigned(Tmp) then Tmp := TTreeView(Node.TreeView).Items.GetFirstNode else Tmp := Tmp.getFirstChild; while Assigned(Tmp) do begin if Tmp.StateIndex in [ARadioUnchecked, ARadioChecked] then Tmp.StateIndex := ARadioUnchecked; Tmp := Tmp.getNextSibling; end; Node.StateIndex := ARadioChecked; end; end; end; //=== { TJvTreeViewCheckBoxOptions } ========================================= constructor TJvTreeViewCheckBoxOptions.Create; var I: Integer; begin inherited Create; for I := Low(FImageIndices) to High(FImageIndices) do FImageIndices[I] := I+1; FCascadeLevels := 0; FCascadeOptions := [poOnCheck, poOnUnCheck] end; procedure TJvTreeViewCheckBoxOptions.Assign(Source: TPersistent); begin if (Source <> Self) and (Source is TJvTreeViewCheckBoxOptions) then begin Style := TJvTreeViewCheckBoxOptions(Source).Style; CascadeLevels := TJvTreeViewCheckBoxOptions(Source).CascadeLevels; CascadeOptions := TJvTreeViewCheckBoxOptions(Source).CascadeOptions; CheckBoxUncheckedIndex := TJvTreeViewCheckBoxOptions(Source).CheckBoxUncheckedIndex; CheckBoxCheckedIndex := TJvTreeViewCheckBoxOptions(Source).CheckBoxCheckedIndex; RadioUncheckedIndex := TJvTreeViewCheckBoxOptions(Source).RadioUncheckedIndex; RadioCheckedIndex := TJvTreeViewCheckBoxOptions(Source).RadioCheckedIndex; end else inherited Assign(Source); end; procedure TJvTreeViewCheckBoxOptions.ChangeImage(OldIndex, NewIndex: Integer); var N: TTreeNode; begin if Assigned(FTreeView) then begin FTreeView.Items.BeginUpdate; try N := FTreeView.Items.GetFirstNode; while Assigned(N) do begin if N.StateIndex = OldIndex then N.StateIndex := NewIndex; N := N.GetNext; end; finally FTreeView.Items.EndUpdate; end; end; end; function TJvTreeViewCheckBoxOptions.GetImageIndex(const Index: Integer): Integer; begin if (Index >= 0) and (Index <= High(FImageIndices)) then Result := FImageIndices[Index] else Result := 0; end; procedure TJvTreeViewCheckBoxOptions.SetImageIndex(const Index, Value: Integer); begin if (Index >= 0) and (Index <= High(FImageIndices)) and (FImageIndices[Index] <> Value) then begin ChangeImage(FImageIndices[Index], Value); FImageIndices[Index] := Value; end; end; procedure TJvTreeViewCheckBoxOptions.SetStyle(const Value: TJvTVCheckBoxStyle); begin if FStyle <> Value then begin FStyle := Value; FTreeView.Checkboxes := FStyle = cbsNative; end; end; //=== { TJvCheckTreeView } =================================================== constructor TJvCheckTreeView.Create(AOwner: TComponent); begin inherited Create(AOwner); FCheckBoxOptions := TJvTreeViewCheckBoxOptions.Create; FCheckBoxOptions.FTreeView := Self; end; destructor TJvCheckTreeView.Destroy; begin FCheckBoxOptions.Free; inherited Destroy; end; procedure TJvCheckTreeView.Click; var P: TPoint; begin if CheckBoxOptions.Style = cbsJVCL then begin GetCursorPos(P); P := ScreenToClient(P); if htOnStateIcon in GetHitTestInfoAt(P.X, P.Y) then InternalSetChecked(Selected, not Checked[Selected], CheckBoxOptions.CascadeLevels); end; inherited Click; end; procedure TJvCheckTreeView.DoToggled(Node: TTreeNode); begin if Assigned(FOnToggled) then FOnToggled(Self, Node); end; function TJvCheckTreeView.DoToggling(Node: TTreeNode): Boolean; begin Result := True; if Assigned(FOnToggling) then FOnToggling(Self, Node, Result); end; function TJvCheckTreeView.GetCheckBox(Node: TTreeNode): Boolean; begin with CheckBoxOptions do Result := (Node <> nil) and (Node.StateIndex in [CheckBoxUncheckedIndex, CheckBoxCheckedIndex]); end; function TJvCheckTreeView.GetChecked(Node: TTreeNode): Boolean; begin with CheckBoxOptions do Result := (Node <> nil) and (Node.StateIndex in [RadioCheckedIndex, CheckBoxCheckedIndex]); end; function TJvCheckTreeView.GetRadioItem(Node: TTreeNode): Boolean; begin with CheckBoxOptions do Result := (Node <> nil) and (Node.StateIndex in [RadioCheckedIndex, RadioUncheckedIndex]); end; procedure TJvCheckTreeView.KeyDown(var Key: Word; Shift: TShiftState); begin inherited KeyDown(Key, Shift); if (CheckBoxOptions.Style = cbsJVCL) and Assigned(Selected) and (Key = VK_SPACE) and (Shift * KeyboardShiftStates = []) then InternalSetChecked(Selected, not Checked[Selected], CheckBoxOptions.CascadeLevels); end; procedure TJvCheckTreeView.SetCheckBox(Node: TTreeNode; const Value: Boolean); begin with CheckBoxOptions do if (Node <> nil) and (Style = cbsJVCL) then if Value then begin if Checked[Node] then Node.StateIndex := CheckBoxCheckedIndex else Node.StateIndex := CheckBoxUncheckedIndex; end else Node.StateIndex := 0; end; procedure TJvCheckTreeView.SetCheckBoxOptions(const Value: TJvTreeViewCheckBoxOptions); begin FCheckBoxOptions.Assign(Value); end; procedure TJvCheckTreeView.InternalSetChecked(Node: TTreeNode; const Value: Boolean; Levels: Integer); var Tmp: TTreeNode; begin if Checked[Node] <> Value then ToggleNode(Node); if (Levels <> 0) and CheckBox[Node] and ((Value and (poOnCheck in CheckBoxOptions.CascadeOptions)) or (not Value and (poOnUnCheck in CheckBoxOptions.CascadeOptions))) then begin Tmp := Node.getFirstChild; while Tmp <> nil do begin if CheckBox[Tmp] then InternalSetChecked(Tmp, Value, Levels - Ord(Levels > 0)); Tmp := Tmp.getNextSibling; end; end; end; procedure TJvCheckTreeView.SetChecked(Node: TTreeNode; const Value: Boolean); begin with CheckBoxOptions do if Style = cbsJVCL then InternalSetChecked(Node, Value, CheckBoxOptions.CascadeLevels) else inherited Checked[Node] := Value; end; procedure TJvCheckTreeView.SetRadioItem(Node: TTreeNode; const Value: Boolean); var B: Boolean; begin with CheckBoxOptions do if (Node <> nil) and (Style = cbsJVCL) then begin if Value then begin B := Checked[Node]; Node.StateIndex := RadioUncheckedIndex; // make sure to toggle the others on or off if B then ToggleNode(Node); end else Node.StateIndex := 0; end; end; procedure TJvCheckTreeView.ToggleNode(Node: TTreeNode); begin if DoToggling(Node) then begin with CheckBoxOptions do ToggleTreeViewCheckBoxes(Node, CheckBoxUncheckedIndex, CheckBoxCheckedIndex, RadioUncheckedIndex, RadioCheckedIndex); DoToggled(Node); end; end; {$IFDEF UNITVERSIONING} const UnitVersioning: TUnitVersionInfo = ( RCSfile: '$RCSfile: JvCheckTreeView.pas,v $'; Revision: '$Revision: 1.17 $'; Date: '$Date: 2004/09/01 15:06:33 $'; LogPath: 'JVCL\run' ); initialization RegisterUnitVersion(HInstance, UnitVersioning); finalization UnregisterUnitVersion(HInstance); {$ENDIF UNITVERSIONING} end. abraço
  20. se a chamada das funções internas não forem as mesmas não será possivel rodar o seu programa abraço
  21. este comando funciona SendMessage(CaptureWindow, WM_CAP_FILE_SAVEDIB, 0, Pchar('c:\temp\sample.bmp'),1); abraço
  22. exemplo: Utilizando o evento OnToggled procedure TForm1.JvCheckTreeView1Toggled(Sender: TObject; Node: TTreeNode); var nFilho, nAnt, nPai: TTreeNode; begin if TJvCheckTreeView(sender).Checked[node] then begin nFilho := Node; nPai := nFilho.GetPrev; nAnt := nPai; if (nPai <> nil) and (nFilho.HasAsParent(nPai)) then begin TJvCheckTreeView(sender).Checked[nPai] := True; end else begin while ((not nFilho.HasAsParent(nPai)) or (not nAnt.HasAsParent(nPai))) and (nPai <> nil) do begin nAnt := nPai; nPai := nAnt.GetPrev; end; end; if (nPai <> nil) and (nFilho.HasAsParent(nPai)) then TJvCheckTreeView(sender).Checked[nPai] := True; end; OBS: Para o Neto é só estudar a lógica para o Pai e Filho abraço
  23. De um modo muito mais facil , que eu descobri aqui se quiser compartilhar a solução com os colegas do forum ... todos agradecem abraços
  24. basta mudar o atribuito do arquivo para somente leitura mas isso não impedirá de alguém apaga-la e usar outra dll com o mesmo nome veja: http://www.planetadelphi.com.br/dica/4789/...s-de-um-arquivo http://www.planetadelphi.com.br/dica/5616/...s-de-um-arquivo http://scriptbrasil.com.br/forum/index.php...st&p=561617 abraço
  25. voce ve usar o inner join exemplos: Inner Join com 2 Tabelas: SELECT Clientes.NOME, Veiculos.MARCA, Veiculos.MODELO FROM Clientes INNER JOIN Veiculos ON (Clientes.COD = Veiculos.COD_CLIENTE) Inner Join com 3 Tabelas: SELECT TOP 10 tblArtigo.cdArtigo, tblArtigo.cdCateg, tblCategoria.Nome, tblColunista.NomeCompleto, tblArtigo.*FROM tblColunista INNER JOIN (tblArtigo INNER JOIN tblCategoria ON tblArtigo.cdCateg = tblCategoria.cdCateg) ON tblColunista.cdCodColun = tblArtigo.cdColunORDER BY tblArtigo.Clicks DESC, tblArtigo.cdArtigo; Inner Join com 4 Tabelas: SELECT BSCodigos.Nome AS Codigo, BSSubCategorias.Nome AS SubCategoria, BSCategorias.Nome AS Categoria, BSComentarios.ComentarioFROM BSSubCategorias INNER JOIN ((BSCategorias INNER JOIN BSCodigos ON BSCategorias.cdCategoria = BSCodigos.cdCategoria) INNER JOIN BSComentarios ON BSCodigos.cdCodigo = BSComentarios.cdCodigo) ON BSSubCategorias.cdSubCat = BSCodigos.cdSubCat; no seu caso ficaria Tabela:TESTE COD_TESTE DATA_INCLUSAO STATUS Tabela: MOTIVO COD_TESTE MOTIVO SELECT TESTE.COD_TESTE, TESTE.DATA_INCLUSAO, TESTE.STATUS, MOTIVO.COD_TESTE, MOTIVO.MOTIVO FROM TESTE INNER JOIN MOTIVO ON (TESTE.COD_TESTE = MOTIVO.COD_TESTE) WHERE STATUS = 1 abraço
×
×
  • Criar Novo...