Display forms in sequence
Hello!
I want to make a sequence of forms where the user can configurate my program.
I want it to be like other installation forms where you fill a form and then
click next until you come to the last page. On thet page you click finish
to complete the installation. How can i do this? I also want the information
in each page to be dependent of the pages before.
[382 byte] By [
Jimmy] at [2007-11-10 12:19:36]

# 1 Re: Display forms in sequence
"Jimmy" <vb.@127.0.0.1> wrote:
>
>Hello!
>I want to make a sequence of forms where the user can configurate my program.
>I want it to be like other installation forms where you fill a form and
then
>click next until you come to the last page. On thet page you click finish
>to complete the installation. How can i do this? I also want the information
>in each page to be dependent of the pages before.
Hi Jimmy,
open the first form like this:
frmFirstForm.Show
If the user finished his configuration he has to click on btnNext.
Private Sub btnNext_Click
frmSecondForm.Show
Unload Me
End Sub
...and so on.
Or, in case you have something like a "Mainframe" you can add the following
code to it:
frmFirstForm.Show vbModal
frmSecondForm.Show vbModal
frmThirdForm.Show vbModal
The vbModal Parameter says, that VB has to wait with the code of frmMain
until the opened form is closed.
>I also want the information
>in each page to be dependent of the pages before.
Can you be more specific? I don't know exactly, what you're trying to do.
Greetings
Daniel
# 2 Re: Display forms in sequence
Well it's quite complex to build it... you're looking for something like the
wizards in office applications. Try opening one and browsing through the
code... perhaps it might give you some ideas.
Good luck!
Jonathan
"Jimmy" <vb.@127.0.0.1> wrote:
>
>Hello!
>I want to make a sequence of forms where the user can configurate my program.
>I want it to be like other installation forms where you fill a form and
then
>click next until you come to the last page. On thet page you click finish
>to complete the installation. How can i do this? I also want the information
>in each page to be dependent of the pages before.
# 3 Re: Display forms in sequence
Thanks for your help!
>>I also want the information
>>in each page to be dependent of the pages before.
>
>Can you be more specific? I don't know exactly, what you're trying to do.
>
>Greetings
>
>Daniel
>
For example. In the first form the user specify how many worksheets of one
kind he want to have in the workbook. In the next form he get a list where
he can give them own names. The list will have as many entries as the number
of worksheets.
Jimmy at 2007-11-11 18:14:34 >

# 4 Re: Display forms in sequence
How can I find these wizards and how can I view the code?
"Jonathan Martens" <j.martens@student.utwente.nl> wrote:
>
>Well it's quite complex to build it... you're looking for something like
the
>wizards in office applications. Try opening one and browsing through the
>code... perhaps it might give you some ideas.
>
>Good luck!
>
>Jonathan
>
>"Jimmy" <vb.@127.0.0.1> wrote:
>>
>>Hello!
>>I want to make a sequence of forms where the user can configurate my program.
>>I want it to be like other installation forms where you fill a form and
>then
>>click next until you come to the last page. On thet page you click finish
>>to complete the installation. How can i do this? I also want the information
>>in each page to be dependent of the pages before.
>
Jimmy at 2007-11-11 18:15:40 >

# 5 Re: Display forms in sequence
Hi Jimmy,
You can do it easily if you use just one form. In the same form use different
frames. The frames should be a control array. place the Next button on the
form ( out of the frames)
For Example , if the frame name is Frame1.
call the function GoAhead on the click of Next button.
At a time only one frame will be visible.
Private Sub GoAhead()
' get the no of frames
tp1 = Frame1.Count
tp1 = tp1 - 1
For i = 0 To tp1
If Frame1(i).Visible = True Then ' get the visible frame
Frame1(i).Visible = False ' hide it
cmdPrevious.Visible = True ' show the previous button
If i < tp1 Then
If tp1 - i = 1 Then '' if the frame is the last one
Frame1(i + 1).Visible = True ' show next frame
cmdNext.Visible = False ' hide next button
cmdFinish.Visible = True ' show finish button
Else
Frame1(i + 1).Visible = True ' Show the next frame
End If
End If
Exit For
End If
Next
End Sub
Hope it will solve ur problem.
Happy Coding
Kshitij
"Jimmy" <vb.@127.0.0.1> wrote:
>
>Hello!
>I want to make a sequence of forms where the user can configurate my program.
>I want it to be like other installation forms where you fill a form and
then
>click next until you come to the last page. On thet page you click finish
>to complete the installation. How can i do this? I also want the information
>in each page to be dependent of the pages before.
