Page 1 of 1

eVB Newbie

PostPosted: Jun 13, 2002 @ 7:04pm
by kr0n

PostPosted: Jun 13, 2002 @ 7:10pm
by fzammetti
Try doing this:

form1.hide
form2.show

What's happening with your code I think is that your showing the second form, but doing form1.end is quickly passing focus back to form1. You need to hide the first form, then show the second (there is also a difference between hiding a form and closing or destroying it, you could do some things with that fact as well).

PostPosted: Jun 13, 2002 @ 7:18pm
by kr0n
that made things even freakier.
i run it, form1 loads, i click on cmdForm, form1 hides, and the text box for form2 shows up, but in the programs folder (the one with the large icons it was running in the background) and then form1 reappears. and also how do i actually close a form?

and i was using form1.hide, not form1.end just a typo when i posted

PostPosted: Jun 13, 2002 @ 7:29pm
by fzammetti
Here, give this a try:



That I think does what you were asking for. Let me know if you have trouble with it.

With regard to how to exit a form, I'm a bit rusty in VB, but I think it's Unload <formname>.

PostPosted: Jun 13, 2002 @ 7:40pm
by kr0n

I didn't know...

PostPosted: Jun 13, 2002 @ 7:55pm
by fzammetti