Tema: Re: Visual studio 5 ir modaline forma
Autorius: Valdas
Data: 2010-10-22 14:04:14
na as kazko nesuprantu, siaip as ant Visual Basic darau, tai kas tas 
instance nezinau :((

"Andrius F" <andriusflMORESPAM@gmail.com> wrote in message 
news:i9rq8p$bic$1@trimpas.omnitel.net...
> kiekviena karta pries ShowDialog() kurk nauja instance..
> using(var form = new SomeForm())
> {
>    if(form.ShowDialog(this) == DialogResult.Ok)
>    {
>        ...
>    }
> }
>
> "Valdas" <valdonas@super.lt> wrote in message 
> news:i9rf9u$qk9$1@trimpas.omnitel.net...
>> ka reiskia nereusint instance, tai kaip tada naudotis tuo ShowDialog ? 
>> man reikalingas tas modaliskumas, nes darau savo open file dialoga, ir 
>> kai uzdarau forma, tik tuomet gaunu reiksme...
>>
>> "fakeID" <fakeID@fakeHost.com> wrote in message 
>> news:i9rcss$n3d$1@trimpas.omnitel.net...
>>> Nereiktu reusinti formos instance, nebent tau tikrai taip reikia (pvz 
>>> forma kuriasi 15 sek, bet tada turbut kazkas blogai su tavo forma ;)..
>>> Blogiausiu atveju isitikink, kad GarbageCollector nesunaikins tavo 
>>> formos:
>>>    a. ikisk instance i static field
>>>    b. galbut verta overridint close, ir hidint forma vietoj base.close()
>>>
>>> bet siaip - nereusink instance. tai bloga architektura
>>>
>>> "Valdas" <valdonas@super.lt> wrote in message 
>>> news:i9r6gd$er1$1@trimpas.omnitel.net...
>>>> Sveiki, iskilo tokia beda, bandant is vienos formos atidaryti kita 
>>>> "Forrm2.ShowDialog()", pradzioje atidaro, bet programai padirbus kokia 
>>>> valanda ir vel bandant atidaryti, meta klaida 
>>>> "ObjectDisposedException", gal nujauciat kur cia beda ?
>>>>
>>>> aciu
>>>>
>>>>
>>
>>