Home All Groups Group Topic Archive Search About

Odd problem with Me.Hide() and Me.Visible = False

Author
6 Jun 2009 6:32 AM
Anthony P.
For some reason, Me.Hide() and Me.Visible=False doesn't work! In my
form_load method, the very fist statement is Me.Hide() but the form
shows. So I tried Me.Visible = False and the form still shows. I've
even tried hiding the form from another form using frmMainForm.Hide()
or frmMainForm.Visible = False and the form still shows.

Any idea what might be going on here?

Thanks!
Anthony

Author
6 Jun 2009 7:07 AM
Cor Ligthert[MVP]
Anthony,

I was forgotten the solution for this problem, but it is easy.

Set the opacity to zero

Opacity = 0

Cor

Show quoteHide quote
"Anthony P." <papill***@gmail.com> wrote in message
news:b6648d42-efab-4dae-88f2-84e2e4496377@e21g2000yqb.googlegroups.com...
> For some reason, Me.Hide() and Me.Visible=False doesn't work! In my
> form_load method, the very fist statement is Me.Hide() but the form
> shows. So I tried Me.Visible = False and the form still shows. I've
> even tried hiding the form from another form using frmMainForm.Hide()
> or frmMainForm.Visible = False and the form still shows.
>
> Any idea what might be going on here?
>
> Thanks!
> Anthony
Author
6 Jun 2009 10:19 AM
Armin Zingler
Anthony P. wrote:
> For some reason, Me.Hide() and Me.Visible=False doesn't work! In my
> form_load method, the very fist statement is Me.Hide() but the form
> shows. So I tried Me.Visible = False and the form still shows. I've
> even tried hiding the form from another form using frmMainForm.Hide()
> or frmMainForm.Visible = False and the form still shows.
>
> Any idea what might be going on here?

The problem is that you first decide to show a Form, then you decide not to
show it. Decide before once.


Armin
Author
6 Jun 2009 8:15 PM
PvdG42
"Anthony P." <papill***@gmail.com> wrote in message
news:b6648d42-efab-4dae-88f2-84e2e4496377@e21g2000yqb.googlegroups.com...
> For some reason, Me.Hide() and Me.Visible=False doesn't work! In my
> form_load method, the very fist statement is Me.Hide() but the form
> shows. So I tried Me.Visible = False and the form still shows. I've
> even tried hiding the form from another form using frmMainForm.Hide()
> or frmMainForm.Visible = False and the form still shows.
>
> Any idea what might be going on here?
>
> Thanks!
> Anthony

Are you using VS2008?
Try putting Me.Hide() in the Activated event procedure. It works for me
here.