OK, here goes. Remember this is for BCB.
1) After creating the main form, create a second form with its
BorderIcons set to false,
BorderStyle to
bsDialog,
FormStyle to
fsStayOnTop, and
Position to
poScreenCenter.
2) Add whatever you want to the second form, bitmaps, text, etc.
3) Add a Timer control to the second form.
4) Create a
OnTimer handler for the Timer control. Put the code
in the handler.
5) Now you will need to create a function that will remove the caption from the second form. You can do this by creating a function prototype in the second form's private user declarations and then adding the function itself. All this function will do is call the base class and the remove the caption.For example, if the function was defined as
Code:
void __fastcall CreateParams(TCreateParams &Params);
then the function would be
Code:
void __fastcall CreateParams(TCreateParams &Params)
{
TForm::CreateParams(Params);
Params.Style &= ~WS_CAPTION;
}
6) Finally, you need to call the form in the main form's
WinMain function. In BCB, you put the following code in the
try loop that is created for you. Put it after the
Code:
Application->Initialize();
call. If you named the second form
Form2 the code would look like
Code:
Form2=new TForm2(Application);
Form2->Show();
Form2->Update;
By the way, these instructions came from
Borland C++ Builder How-To by John Miano, Tom Cabanski, and Harold Howe. The latter's web site is
. James P. Cottingham
I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.