Eduardo,
Obrigado pela sua ajuda. Na realidade, faltava instalar um componente, que eu não me lembrava. Cumprimentos, Joaquim. --- Em delphi-br@yahoogrupos.com.br, "Eduardo Bianchi Ribeiro" <[EMAIL PROTECTED]> escreveu > > Joaquim, provavelmente vc utiliza um Componente nesse form que vc > não instalou, vc utiliza alguma library da Novell nesse form ? tenta > adicionar essa unit que estou postando ao seu projeto, acho que esse é > o Objeto que está faltando no seu form ... > > Abraços ... > > > > > > unit Select; > > interface > > uses > Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, > Dialogs, > StdCtrls, CalWin32, NetWin32; > > type > TSelectObjectForm = class(TForm) > btnOK: TButton; > btnCancel: TButton; > fraObjects: TGroupBox; > btnSetContext: TButton; > lblContext: TLabel; > lstObjects: TListBox; > procedure FormCreate(Sender: TObject); > procedure btnSetContextClick(Sender: TObject); > private > { Private declarations } > hContext: NWDSContextHandle; > FObjectClass: string; > function GetObjectClass: string; > procedure SetObjectClass(aValue: string); > public > { Public declarations } > procedure ChangeToContext(aContext: NWDSContextHandle); > procedure CanonicalizeNames; > property ObjectClass: string read GetObjectClass write SetObjectClass; > end; > > var > SelectObjectForm: TSelectObjectForm; > > implementation > > uses NWHelper, Context; > > {$R *.DFM} > > > /////////////////////////////////////////////////////////////////// ///////////// > // { Private Methods } > function TSelectObjectForm.GetObjectClass: string; > begin > GetObjectClass := FObjectClass; > end; // TSelectObjectForm.GetObjectClass() > > procedure TSelectObjectForm.SetObjectClass(aValue: string); > begin > if (FObjectClass <> aValue) then > begin > FObjectClass := aValue; > lstObjects.Items.Clear; > lstObjects.Items.AddStrings(GetObjectList(hContext, FObjectClass)); > end; // if (FObjectClass <> aValue) > end; // TSelectObjectForm.SetObjectClass() > > > /////////////////////////////////////////////////////////////////// ///////////// > // { Public Methods } > procedure TSelectObjectForm.ChangeToContext(aContext: NWDSContextHandle); > var > Context: array[0..MAX_DN_BYTES] of Char; > begin > try > NWCheckAndThrow( NWDSDuplicateContextHandle(aContext, hContext) ); > NWCheckAndThrow( NWDSGetContext(hContext, DCK_NAME_CONTEXT, > @Context) ); > lblContext.Caption := Context; > lstObjects.Items.Clear; > lstObjects.Items.AddStrings(GetObjectList(hContext, FObjectClass)); > except > on E:ENWException do > E.Show(); > end; // try-except > end; // TSelectObjectForm.ChangeToContext() > > procedure TSelectObjectForm.CanonicalizeNames; > var > ShortName, CanonName: array[0..MAX_DN_BYTES] of Char; > Index: Integer; > bChecked: Boolean; > begin > for Index := 0 to lstObjects.Items.Count - 1 do > begin > bChecked := lstObjects.Selected[Index]; // Preserve setting > StrPCopy (ShortName, lstObjects.Items[Index]); > try > NWCheckAndThrow( NWDSCanonicalizeName(hContext, @ShortName, > @CanonName) ); > except > on E:ENWException do > E.Show(); > end; // try-except > lstObjects.Items[Index] := '.' + string(CanonName); > lstObjects.Selected[Index] := bChecked; > end; // for > end; // TSelectObjectForm.CanonicalizeNames > > > /////////////////////////////////////////////////////////////////// ///////////// > // { Delphi-Generated Methods } > procedure TSelectObjectForm.FormCreate(Sender: TObject); > begin > FObjectClass := ''; // Show all objects > hContext := GetContextHandle(); > end; > > procedure TSelectObjectForm.btnSetContextClick(Sender: TObject); > var > ContextDlg: TContextForm; > NameContext: array[0..MAX_DN_BYTES] of Char; > begin > // Initialize > ContextDlg := TContextForm.Create(self); > ContextDlg.ChangeToContext(hContext); > > // Show the selection dialog > if (ContextDlg.ShowModal = mrOk) then > begin > // Get the new Name Context > StrPCopy (NameContext, ContextDlg.NameContext); > NWCheckAndThrow( NWDSSetContext(hContext, DCK_NAME_CONTEXT, > @NameContext) ); > lstObjects.Items.Clear; > lstObjects.Items.AddStrings(GetObjectList(hContext, FObjectClass)); > end; // OK hit > ContextDlg.Free; > end; > > end. > > > > > > --- Em delphi-br@yahoogrupos.com.br, "Joaquim Macedo" > <[EMAIL PROTECTED]> escreveu > > > > Olá a todos. > > > > > > Utilizo o Delphi 5 Enterprise. > > > > O disco duro da máquina onde tinha instalado o Delphi morreu. > > Instalei o Delphi noutra máquina, mas dá erro ao ler um form, do meu > > programa: > > > > Class TSelectDlgT not found. Ignore the error and continue? NOTE: > > Ignoring the error may cause components to be deleted or property > > values to be lost. > > > > > > O que fazer para corrigir este erro? > > > > Desde já, o meu muito obrigado. > > > > > > Cumprimentos, > > Joaquim. > > > -- <<<<< FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM >>>>> <*> Para ver as mensagens antigas, acesse: http://br.groups.yahoo.com/group/delphi-br/messages <*> Para falar com o moderador, envie um e-mail para: [EMAIL PROTECTED] Links do Yahoo! Grupos <*> Para visitar o site do seu grupo na web, acesse: http://br.groups.yahoo.com/group/delphi-br/ <*> Para sair deste grupo, envie um e-mail para: [EMAIL PROTECTED] <*> O uso que você faz do Yahoo! Grupos está sujeito aos: http://br.yahoo.com/info/utos.html