Form Show

  • Thread starter Christopher Pragash
  • Start date
C

Christopher Pragash

Hello All,

I am having trouble displaying forms (eg: Form2.Show) when called from
within a form (eg: Form). What I am trying to do is to create an instance of
Form2 (objForm2 = new Form2) and then call show on that form (objform2.Show
and objForm2.BringToFront). I also try to hide Form1 (Form1.hide) which
works fine...but form2 does not show up although it is still in memory and
if activated explicitly (from the settings/System/memory/RunningPrograms)
Form2 is displayed. Could anybody please help here?

Thanks,
Chris
 
S

Saul

Chris,

I am having a similar problem. I have a multi-form application and it's
worked fine until I've gotten down to my 4th form deep. When I open the 5th
form, it put's it into position 3, rather than visible in the 5th (front)
position. Despite all the calls I make to show, bringtofront etc, this
problem exists.

I am also cranky about the fact that when you use the cross in the top right
hand corner to close the window it doesn't fire the close event. So instead,
you have to use the de-activate event. This is a problem when developing (eg
msgbox which triggers the event) and also forward opening of forms (which
also fire the event). Perhaps I'm missing something (quite possible!), but
this seems really dumb.

Anyway, try this code behind a button on form 1 --

dim myform2 as new form2
myform2.show()

Good luck!
- Saul
 
G

Guest

this may not be relevant to your intended purpose but its an interesting and not immediately obvious technique so i mention i

If you have a multiform app you may choose to have only one visible at once. The trick is stopping them appear in the switcher bar, which you do by setting the form.text property to "". In this way you can prevent the user from having access to other forms. Restore its visibility by reseting the text to a non empty string
 
M

microsoft

This worked for me. I had to dim the form to make it work (Form3 is the
name of the form I want to show).

Dim formd As New Form3

formd.Show()
 

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