problema con EResNotFound
Publicado por Diego Gutierrez (15 intervenciones) el 06/11/2007 00:54:44
Hola, estoy intentando hacer un procesito que recorre todos los registros de un tquery y mientras hace eso que vaya presentando el progreso en una progressbar, el codigo que tengo es el siguiente
unit MisLibs;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, Buttons, ExtCtrls, DBCtrls, DB, DBTables,
ppBands, ppCache, ppClass, ppComm, ppRelatv, ppProd, ppReport, Grids, DBGrids,
ppCtrls, ppPrnabl, ppDB, ppDBPipe, ppDBBDE, ppVar, jpeg, DBClient, Provider,
Excel_TLB, ActiveX, ComObj, TeEngine, Series, TeeProcs, Chart, DbChart,DateUtils, ShlObj, ShellAPI;
procedure funcionPatito(elQuery: Tquery; nombreCandidato:string);
type
BarraDeProgreso = class(TForm)
procedure CreateParams(var Params: TCreateParams); override;
private
public
end;
implementation
procedure prog(elQuery: Tquery; nombreCandidato:string);
var
XL : TDataSetToExcel;
saveDialog : TSaveDialog; // Save dialog variable
RecPath : PAnsiChar;
folder: string;
archivo:string;
formulario: MisLibs.BarraDeProgreso;
barra:TProgressBar;
begin
formulario:=MisLibs.BarraDeProgreso.Create(nil);
with formulario do
begin
Width:=300;
Height:=60;
Left:=100;
Top:=100;
Visible:=true;
end;
barra:=TProgressBar.Create(formulario);
with barra do
begin
Parent:=formulario;
Width:=290;
Height:=50;
Top:=5;
Left:=5;
Visible:=true;
Min:=0;
Max:=elQuery.RecordCount;
Position:=round(elQuery.RecordCount/2);
end;
//recorrer todo el query y actualizar la barra de progreso
//quitar la ventana
end;
//
{ BarraDeProgreso }
procedure BarraDeProgreso.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.Style := Params.Style or ws_popup xor ws_dlgframe;
end;
end.
se supone que es una libreria que contiene la uncion patito que le mando un query y lo recorre de inicio a fin, y pues para ello intento crear un formulario en tiempo de ejecucion directamente en la funcion y ahi le agrego la barra, pero siempre que llego a la linea
formulario:=MisLibs.BarraDeProgreso.Create(nil);
me marca el error EResNotFound con 'resource barradeprogreso not found y pues en realidad no se a que se deba
Alguna sugerencia me seria de mucha utilidad
unit MisLibs;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, Buttons, ExtCtrls, DBCtrls, DB, DBTables,
ppBands, ppCache, ppClass, ppComm, ppRelatv, ppProd, ppReport, Grids, DBGrids,
ppCtrls, ppPrnabl, ppDB, ppDBPipe, ppDBBDE, ppVar, jpeg, DBClient, Provider,
Excel_TLB, ActiveX, ComObj, TeEngine, Series, TeeProcs, Chart, DbChart,DateUtils, ShlObj, ShellAPI;
procedure funcionPatito(elQuery: Tquery; nombreCandidato:string);
type
BarraDeProgreso = class(TForm)
procedure CreateParams(var Params: TCreateParams); override;
private
public
end;
implementation
procedure prog(elQuery: Tquery; nombreCandidato:string);
var
XL : TDataSetToExcel;
saveDialog : TSaveDialog; // Save dialog variable
RecPath : PAnsiChar;
folder: string;
archivo:string;
formulario: MisLibs.BarraDeProgreso;
barra:TProgressBar;
begin
formulario:=MisLibs.BarraDeProgreso.Create(nil);
with formulario do
begin
Width:=300;
Height:=60;
Left:=100;
Top:=100;
Visible:=true;
end;
barra:=TProgressBar.Create(formulario);
with barra do
begin
Parent:=formulario;
Width:=290;
Height:=50;
Top:=5;
Left:=5;
Visible:=true;
Min:=0;
Max:=elQuery.RecordCount;
Position:=round(elQuery.RecordCount/2);
end;
//recorrer todo el query y actualizar la barra de progreso
//quitar la ventana
end;
//
{ BarraDeProgreso }
procedure BarraDeProgreso.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.Style := Params.Style or ws_popup xor ws_dlgframe;
end;
end.
se supone que es una libreria que contiene la uncion patito que le mando un query y lo recorre de inicio a fin, y pues para ello intento crear un formulario en tiempo de ejecucion directamente en la funcion y ahi le agrego la barra, pero siempre que llego a la linea
formulario:=MisLibs.BarraDeProgreso.Create(nil);
me marca el error EResNotFound con 'resource barradeprogreso not found y pues en realidad no se a que se deba
Alguna sugerencia me seria de mucha utilidad
Valora esta pregunta


0