Cmd button not visible - strange problem
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
Re: Cmd button not visible - strange problem
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?
Re: Cmd button not visible - strange problem
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
Re: Cmd button not visible - strange problem
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?
Re: Cmd button not visible - strange problem
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
Re: Cmd button not visible - strange problem
Unload Form1
DoEvents 'put this in and try.
Form1.Show
Re: Cmd button not visible - strange problem
Use this:
Unload Form1
Form1.Show
Form1.Refresh
;-)
Michael Vlastos
Company MODUS SA
Development Department
Athens, Greece
Tel: +3-01-9414900