Hi, My name is Kennedy
Can somebody help me with a few questions on Delphi 2 ?
Displaying a SplashScreen
The following two event handlers display and close a form called
SplashScreen before the applications main form opens.
The constant Startup is declared in Form1s interface part.
const
Startup = ( What must go here ??) ; Is this right, what type of
constant is declared here?
The first event handler calls the Show method of SplashScreen form Form1s
OnActivate event.
procedure TForm1.FormActivate(Sender: TObject);
begin
if Startup then
begin
Startup := False;
SplashScreen.Show;
end;
end;
SplashScreen contains a Timer component whose Interval property is set to
3000, so the form is displayed for three seconds and then closes. The forms
Close method is attached to the timer components OnTimer event.
procedure TForm2.Timer1Timer (Sender : TObject);
begin
Close;
end;
Is all this right, everything is just like it is in the help file but I get
one error after the other. Will somebody please tell me what must be changed
or declared and where it must be done.
DLLs Problems.
I have writen an application with a lot of procedures in it, but this makes
my .exe file quite big. I would like to put the procedures into dlls and
have the application call it from there, but I cant seem to get it to work.
I can do it with functions but not with procedures, yet the same principles
should apply?.
Example.
Main form with a TImage component on it. When the image is clicked it opens
a bitmap, which is displayed on another form (ViewForm) with a image
component. The procedure looks like this:
procedure TForm1.Image1Click(Sender: TObject);
begin
ViewForm.Image1.Picture.LoadFromFile('C:\BITMAPS\WORLDS\WORLD1.BMP');
end;
I would like to put this procedure in a DLL, and when the image is clicked
on the main form it should get the procedure form the DLL and then display
the bitmap on the ViewForm. Can somebody tell me how my DLL should look,
what the exports clause should look like in the DLL and how my import
routine should look in my .exe file. A detailed explanation would be
appreciated with identifier names etc.
PS. Does anybody know how to load any other type of graphic format except
bitmaps into Dhelpi?
KINDLY E-MAIL ME ANY INFO TO kennedyr...@icon.co.za
Thanks
Kennedy