Hey Folks,
I am trying to access a form that is within a RLL. I can't change the RLL
but I need to be able to Show the form within that RLL as modeless. Its
currently being shown as modal by an exported procedure within the RLL.
Here is the code I am working on
TPrintReport = function(Index: LongInt; Params: Variant): WordBool;
TDLLMenuItem = class(TMenuItem)
private
{ Private declarations }
FIndex, FSR_ID: LongInt;
FGroupDescription, FDLLName: String;
protected
{ Protected declarations }
public
{ Public declarations }
property Index: LongInt read FIndex write FIndex;
property SR_ID: LongInt read FSR_ID write FSR_ID;
property DLLName: String read FDLLName write FDLLName;
property GroupDescription: String read FGroupDescription write
FGroupDescription;
end;
procedure TfrmMain.RLLReportMenuItemClick(Sender: TObject);
var
Handle: THandle;
HPrintReport: TPrintReport;
MenuItem: TDLLMenuItem;
begin
MenuItem := TDLLMenuItem(Sender);
Handle := SafeLoadLibrary(PChar(MenuItem.DLLName));
if Handle <> 0 then
try
@HPrintReport := GetProcAddress(Handle, 'PrintReport');
if @HPrintReport <> nil then
try
HPrintReport(MenuItem.Index, 0);
except
end;
finally
FreeLibrary(Handle);
end;
end;
Thanks in advance.
Damien
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"