back and forth with forms...

  • Thread starter Thread starter EMW
  • Start date Start date
E

EMW

Hi,

My program (VB.NET for PPC) has three forms, the first one is a SplashForm,
the second and third for user input.

Ofcourse the program starts up with the splashform, where it must load the
other two forms in memory.
Then it switches to the first form.
On this form there is a button to go to the second form and on that form
there is a button to go back to the first form.

I've tried something, but then the second form is created and created and
created ....etc.

How can I make this happen?

rg,
Eric
 
I've tried something, but then the second form is created and created and
created ....etc.

Code snippet? What exactly means created and created...?
 
Wel it seems like it is created and created again....

In the timer (interval = 100) I put this:

Dim firstForm as frmMain
firstForm = new frmMain
firstForm.showdialog()

In the constructor of frmMain I put:

private splashForm as frmSplash
Public Sub New(byVal splashform as frmSplash)
myBase.New()
me.splashForm = splashform
...
..
end sub

In the button click event I put:

Dim secondForm as frmInfo
secondForm = new frmInfo
secondForm.showdialog()

In the constructor of frmInfo I put:

private firstForm as frmMain
Public Sub New(byVal firstform as frmMain)
myBase.New()
me.firstForm = firstform
...
..
end sub

In the button click event I put:
me.hide
firstform.show

At first it goes ok, but when the frmMain is shown and the user clicks on
the button again to go back to frmInfo, things go wrong.

rg,
Eric
 

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

Back
Top