Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I want to close the form before it is displayed
Message
Information générale
Forum:
Borland C++ Builder
Catégorie:
Langage C++ Builder
Divers
Thread ID:
01024084
Message ID:
01024139
Vues:
19
>>>I am having some problems closing my form before it is displayed. I set up connections to some tables in the form's constructor, if a connection can not be established I would like to notify the user (messagebox) and then abort the displaying of the form.
>>>I have tried putting a Close() command in the form's constructor, activate event and create event, but the form went right on displaying.
>>>
>>>Any hints would be appreciated.
>>>
>>>Thanks,
>>>Einar
>>
>>
>>Hi Einar :-)
>>
>>Just a hint. Any windows that will be created, the OS always send WM_CREATE message to the window procedure. So if you can access the window procedure, trap it there.
>>
>>The default is "return 0" - continue window creation.
>>Issue "return -1" to destroy the window.
>>
>>Hope it helps a little
>>Regards
>
>Herman,
>I know I asked for hints, but I think I would rather just have the solution :)
>I know I have closed the form before it has displayed in VFP and I think I have done it in C# before. (it was very simple in VFP)
>The problem is that the form's create, show and activate events do not have a return value (void), I am unsure where to put the return -1; command.
>
>Any spelled out solution would be appreciated <s>.
>
>Thanks,
>Einar


Well, I gave you the hint because I never use Borland C++ Builder. I don't know how it constructed the form/window. My apologies for jumping in. Hope someone can give you an answer :)

Regards
Herman
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform