Home All Groups Group Topic Archive Search About

VB2005 Hiding Windows Forms

Author
9 Aug 2006 9:49 PM
Steve954
I recently installed and started using VS2005 on a Windows XP Pro machine.
When creating a new windows forms project I find that I am unable to hide any
forms using the me.hide() or me.visible = False methods. As far as I can tell
these methods are available and should work in VB2005. Any help and advise
would be great as this is causing be a number of problems of two new 
projects I am working on.

Many Thanks

Author
9 Aug 2006 11:17 PM
pvdg42
"Steve954" <Steve***@discussions.microsoft.com> wrote in message
news:8180D4BC-0131-478B-872B-6081B973D0C1@microsoft.com...
>I recently installed and started using VS2005 on a Windows XP Pro machine.
> When creating a new windows forms project I find that I am unable to hide
> any
> forms using the me.hide() or me.visible = False methods. As far as I can
> tell
> these methods are available and should work in VB2005. Any help and advise
> would be great as this is causing be a number of problems of two new
> projects I am working on.
>
> Many Thanks
>

<FormName>.Visible = False works fine here. VS .NET Pro 2005 on Win XP SP2.
Please provide a short, but complete example where it fails on your PC.
Author
9 Aug 2006 11:20 PM
pvdg42
"Steve954" <Steve***@discussions.microsoft.com> wrote in message
news:8180D4BC-0131-478B-872B-6081B973D0C1@microsoft.com...
>I recently installed and started using VS2005 on a Windows XP Pro machine.
> When creating a new windows forms project I find that I am unable to hide
> any
> forms using the me.hide() or me.visible = False methods. As far as I can
> tell
> these methods are available and should work in VB2005. Any help and advise
> would be great as this is causing be a number of problems of two new
> projects I am working on.
>
> Many Thanks
>

<FormName>.Visible = False works fine here, as does Me.Hide().
VS .NET Pro 2005 on Win XP SP2.
Please provide a short, but complete example where it fails on your PC.
Author
10 Aug 2006 12:09 AM
gene kelley
On Wed, 9 Aug 2006 14:49:57 -0700, Steve954 <Steve***@discussions.microsoft.com> wrote:

>I recently installed and started using VS2005 on a Windows XP Pro machine.
>When creating a new windows forms project I find that I am unable to hide any
>forms using the me.hide() or me.visible = False methods. As far as I can tell
>these methods are available and should work in VB2005. Any help and advise
>would be great as this is causing be a number of problems of two new 
>projects I am working on.
>
>Many Thanks

Not working as in still visible, or, Closing rather than Hiding?
How and where are you using Hide?

Gene
Author
10 Aug 2006 7:38 AM
Steve954
Neither method works, it is as if they were not called, the form stays both
visible and fully usable.

I created a new project with a single form (with the defaullt name), tried
adding the me.hide() to the form load event but the form remains visible. I
tried replacing the me.hide() with the me.visible = False but still the same.
Thus the code could not be simpler.

Many Thanks

Show quoteHide quote
"gene kelley" wrote:

> On Wed, 9 Aug 2006 14:49:57 -0700, Steve954 <Steve***@discussions.microsoft.com> wrote:
>
> >I recently installed and started using VS2005 on a Windows XP Pro machine.
> >When creating a new windows forms project I find that I am unable to hide any
> >forms using the me.hide() or me.visible = False methods. As far as I can tell
> >these methods are available and should work in VB2005. Any help and advise
> >would be great as this is causing be a number of problems of two new 
> >projects I am working on.
> >
> >Many Thanks
>
> Not working as in still visible, or, Closing rather than Hiding?
> How and where are you using Hide?
>
> Gene
>
Author
10 Aug 2006 9:21 AM
gene kelley
On Thu, 10 Aug 2006 00:38:01 -0700, Steve954 <Steve***@discussions.microsoft.com> wrote:

>Neither method works, it is as if they were not called, the form stays both
>visible and fully usable.
>
>I created a new project with a single form (with the defaullt name), tried
>adding the me.hide() to the form load event but the form remains visible. I
>tried replacing the me.hide() with the me.visible = False but still the same.
>Thus the code could not be simpler.
>
>Many Thanks

Me.Hide has no meaning in a Load Event as the form does not become visible until the Load Event is
completed (nothing yet to hide).  What you are seeing is simply the form loading and displaying as
normal.

Put a Button on that simple form example and add Me.Hide to the button click event.


Gene


Show quoteHide quote
>
>"gene kelley" wrote:
>
>> On Wed, 9 Aug 2006 14:49:57 -0700, Steve954 <Steve***@discussions.microsoft.com> wrote:
>>
>> >I recently installed and started using VS2005 on a Windows XP Pro machine.
>> >When creating a new windows forms project I find that I am unable to hide any
>> >forms using the me.hide() or me.visible = False methods. As far as I can tell
>> >these methods are available and should work in VB2005. Any help and advise
>> >would be great as this is causing be a number of problems of two new 
>> >projects I am working on.
>> >
>> >Many Thanks
>>
>> Not working as in still visible, or, Closing rather than Hiding?
>> How and where are you using Hide?
>>
>> Gene
>>
Author
11 Aug 2006 6:13 PM
Steve954
Thanks your advise led me to look for a event that fires after the form load
has completed and subsequently found the Form_Shown event. I have used the
me.hide method in this and all now works as required.

Many Thanks

Show quoteHide quote
"gene kelley" wrote:

> On Thu, 10 Aug 2006 00:38:01 -0700, Steve954 <Steve***@discussions.microsoft.com> wrote:
>
> >Neither method works, it is as if they were not called, the form stays both
> >visible and fully usable.
> >
> >I created a new project with a single form (with the defaullt name), tried
> >adding the me.hide() to the form load event but the form remains visible. I
> >tried replacing the me.hide() with the me.visible = False but still the same.
> >Thus the code could not be simpler.
> >
> >Many Thanks
>
> Me.Hide has no meaning in a Load Event as the form does not become visible until the Load Event is
> completed (nothing yet to hide).  What you are seeing is simply the form loading and displaying as
> normal.
>
> Put a Button on that simple form example and add Me.Hide to the button click event.
>
>
> Gene
>
>
> >
> >"gene kelley" wrote:
> >
> >> On Wed, 9 Aug 2006 14:49:57 -0700, Steve954 <Steve***@discussions.microsoft.com> wrote:
> >>
> >> >I recently installed and started using VS2005 on a Windows XP Pro machine.
> >> >When creating a new windows forms project I find that I am unable to hide any
> >> >forms using the me.hide() or me.visible = False methods. As far as I can tell
> >> >these methods are available and should work in VB2005. Any help and advise
> >> >would be great as this is causing be a number of problems of two new 
> >> >projects I am working on.
> >> >
> >> >Many Thanks
> >>
> >> Not working as in still visible, or, Closing rather than Hiding?
> >> How and where are you using Hide?
> >>
> >> Gene
> >>
>
Author
10 Aug 2006 7:27 AM
Truong Hong Thi
It won't work if you call it in form's Load event.
Even if you call Close in form Load, the form might splash before
hiding.
Calling Dispose() does not splash.

Steve954 wrote:
Show quoteHide quote
> I recently installed and started using VS2005 on a Windows XP Pro machine.
> When creating a new windows forms project I find that I am unable to hide any
> forms using the me.hide() or me.visible = False methods. As far as I can tell
> these methods are available and should work in VB2005. Any help and advise
> would be great as this is causing be a number of problems of two new
> projects I am working on.
>
> Many Thanks