Adil,
The form class has in fact only one purpose: Showing a form.
Therefore if you don't want to show it use another class to decide if you
want to show it. By instance Armin, Herfried and others use a seperated
module main to start it from.
The best way to get some help in my opinion is to show *some* code by
instance as you have it now in your load form class. Than we maybe
understand what you want to do.
Or even better, explain as well what is the purpose to get that handle.
Cor
"Adil Akram" <(E-Mail Removed)> schreef in bericht
news:2E368599-181E-4048-9714-(E-Mail Removed)...
> Cor,
> As u suggested to correspond privately, tell me your email address. I've
> sent mail at your address "(E-Mail Removed)" but its bounced back.
>
> As told, In load event I tried to close the form but it comes with error
> "Additional information: Cannot call Close() while doing CreateHandle()."
>
> I've also tried to call me.Dispose() in constructor but the show method
> form
> caller gives error because object destroyed before show method called.
>
> I've also tried to do this in HandleCreated event but the same error
>
> Please tell me if there's any other event before or after load event that
> I
> can
> use safely to cancel form loading, or if u have any other better idea to
> tackle this situation please tell me that.
>
>
> "Cor Ligthert [MVP]" wrote:
>
>> Adil,
>>
>> > I've already tried me.close but it comes up with following error
>> >
>> Your question is Cancellin an event in a event procedure.
>>
>> I think that it is completly answered.
>>
>> If you have another problem, than ask that direct, that saves others
>> time.
>>
>> Just my thought,
>>
>> Cor
>>
>>
>>
|