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

A

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
 
C

Cor Ligthert[MVP]

Anthony,

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

Set the opacity to zero

Opacity = 0

Cor
 
A

Armin Zingler

Anthony said:
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
 
P

PvdG42

Anthony P. said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top