472,145 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

VB2005 Hiding Windows Forms

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

Aug 9 '06 #1
7 1684

"Steve954" <St******@discussions.microsoft.comwrote in message
news:81**********************************@microsof t.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.

Aug 9 '06 #2

"Steve954" <St******@discussions.microsoft.comwrote in message
news:81**********************************@microsof t.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.
Aug 9 '06 #3
On Wed, 9 Aug 2006 14:49:57 -0700, Steve954 <St******@discussions.microsoft.comwrote:
>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
Aug 10 '06 #4

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:
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
Aug 10 '06 #5
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

"gene kelley" wrote:
On Wed, 9 Aug 2006 14:49:57 -0700, Steve954 <St******@discussions.microsoft.comwrote:
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
Aug 10 '06 #6
On Thu, 10 Aug 2006 00:38:01 -0700, Steve954 <St******@discussions.microsoft.comwrote:
>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 <St******@discussions.microsoft.comwrote:
>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
Aug 10 '06 #7
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

"gene kelley" wrote:
On Thu, 10 Aug 2006 00:38:01 -0700, Steve954 <St******@discussions.microsoft.comwrote:
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 <St******@discussions.microsoft.comwrote:

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
Aug 11 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by Bob Weiner | last post: by
6 posts views Thread by Maileen | last post: by
10 posts views Thread by Galen Somerville | last post: by
14 posts views Thread by Dom | last post: by
15 posts views Thread by Aalaan | last post: by
3 posts views Thread by Web Search Store | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.