Home All Groups Group Topic Archive Search About

vb2005 - how to rehide Form constructor after exposing it? -not co

Author
23 Jun 2006 7:19 PM
Rich
Greetings,

I observed that in VB2005 the designer generated code is hidden.  The
initialize code appears to be stored in a different module than the Form's
class module.  But the form's class module constructor is in the same module
as the Form class (obviously).  Well, I exposed the constructor, which was
originally unexposed.  Is there a way to hide it again after exposing it?  I
don't mean collapse, I mean hide it the way it was originally?

Thanks,
Rich

Author
23 Jun 2006 7:22 PM
Rich
I figured it out.  You can just delete it - it doesn't really get deleted,
just hidden.



Show quoteHide quote
"Rich" wrote:

> Greetings,
>
> I observed that in VB2005 the designer generated code is hidden.  The
> initialize code appears to be stored in a different module than the Form's
> class module.  But the form's class module constructor is in the same module
> as the Form class (obviously).  Well, I exposed the constructor, which was
> originally unexposed.  Is there a way to hide it again after exposing it?  I
> don't mean collapse, I mean hide it the way it was originally?
>
> Thanks,
> Rich
Author
26 Jun 2006 2:00 PM
Jim Wooley
The form's constructor is scoped as Public Overridable by default. That means,
you can add a local one or just use the base classes version. IF you decide
to include a specialized constructor in your form, you can either do it in
the form.vb code behind file or in the form.vb.designer file which includes
the "don't touch this" region present in vs2002-2003. To see the .designer
file in VS 2005, click the "show all files" button in the solution explorer.
Then click the plus in front of the form file you wish to see and the .designer
file will be exposed.

Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx

Show quoteHide quote
> I figured it out.  You can just delete it - it doesn't really get
> deleted, just hidden.
>
> "Rich" wrote:
>
>> Greetings,
>>
>> I observed that in VB2005 the designer generated code is hidden.  The
>> initialize code appears to be stored in a different module than the
>> Form's class module.  But the form's class module constructor is in
>> the same module as the Form class (obviously).  Well, I exposed the
>> constructor, which was originally unexposed.  Is there a way to hide
>> it again after exposing it?  I don't mean collapse, I mean hide it
>> the way it was originally?
>>
>> Thanks,
>> Rich