Click to See Complete Forum and Search --> : Cmd button not visible - strange problem
Manivannan
July 24th, 1999, 03:33 AM
Hi
Click event of a command button has the following code :
Unload Form1
Form1.Show
When I click the cmd button the cmd button gets disappeared.
Note:
1) Designtime Visible property for this button is True.
2) Nowhere in code I am setting the visible property of this control or its containers.
Infact when I click this button is disappearing and also in its position I am seeing the form not its container. (It seems like a hole in that spot).
Any suggestions.
Thanks
Manivannan
Ravi Kiran
July 26th, 1999, 12:43 AM
Hi,
I was not able to reproduce this behavious!!.
Is the command btn on the same form, ie Form1?
In which case, i would go for
Unload Me
Form1.show '' **Even this is funny!?!
Infact i was able to get it working for all 3 combinations. : (the btn is on Form1 itself)
Unload me
Form1.Show
and
Unload Form1
Form1.show
and
Unload Me
Me.Show
Form1 shows at a different position on each click(because starup position is 3, set by Windows), showing that it is unloading and loading again!!!
So, what is the problem?
Jan Businger
July 26th, 1999, 02:29 AM
Hi,
Very strange! I can't reproduce this either.
What if you delete the command and insert a new one on the form?
What kind of project is this?
Jan
Andy K.
July 26th, 1999, 02:38 AM
Hey! I don't know if this will help but, it helped me before with frames and textboxes.....left-click onto command button and set it to "bring to front"
maybe that will help?
Cana
August 1st, 1999, 09:18 PM
You are using the Command Button to Unload the form and then again you are loading the form in the same event,which is not correct.Even then this
should not happen
Try this:
unload Me
Me.Show
Jan Businger
August 2nd, 1999, 02:45 AM
Unload Form1
DoEvents 'put this in and try.
Form1.Show
Dr_Michael
August 2nd, 1999, 05:45 AM
Use this:
Unload Form1
Form1.Show
Form1.Refresh
;-)
Michael Vlastos
Company MODUS SA
Development Department
Athens, Greece
Tel: +3-01-9414900
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.