Hello I want to make different pages in my program. When you open it up it will be on page 1, and theres a next step button. When you click that you go to step 2, where there is a previous step and next step button. I am using this code right now (for example for the first forms next step to go to form 2) :
Rather than using separate forms, Use 1 form which contains Picture boxes as each step and add your controls for each step in each Picture box
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.
uhhh.... So on my one form I made a picture box which is blank and covers the whole form, so now what code do I need to individually access each one like forms?
Im not good at editing the code and for the picture boxes I cant place buttons on them because you cant see them..
BTW I just checked and there's no reason you can't put a button in a picturebox, but you can't drag them there, you have to either draw then on the picturebox or cut/paste them there. The same goes for any other control you want to put in the picturebox.
Another way to possibly solve the taskbar problem is to set subquential forms showintaskbar property to false. Thus you would keep a form visable, say form1 but enabled = false and then when you show form2 (with its showintaskbar=false) you overlay it on top of form 1 so it cover/hides it. However, if you are building a wizard like app, meaning do step1, then step2, then step3, perhaps you should use a MDI application interface.
Start new standard project, add mdi form, add code to mdi form...
Code:
Option Explicit
Private Sub MDIForm_Load()
Form1.Show
End Sub
select form1, go to properties box and set mdi child to true, window state to maximized, add command button. Then go to ide menu project>properties and set startup object MDIForm1. Now go to ide menu project>add form (Form2). Then double click on command button and add code...
Code:
Option Explicit
Private Sub Command1_Click()
Form2.Show
Me.Enabled = False
Form2.ZOrder 0
End Sub
and so on, and so on for each form/step plus other code you need. Run>test
Now for a test non mdi (same test project)...
Go to ide menu project>properties and set startup object to Form1. Select Form1 and in properties box change its mdi child setting back to false. Set its windowstate back to normal and size it like you want. Remove MDIForm1 from test project by right clicking on MDIForm1 in the Project properties and select remove MDIForm1. Add code to form1
Code:
Option Explicit
Private Sub Command1_Click()
Load Form2
Form2.Left = Me.Left
Form2.Top = Me.Top
Form2.Height = Me.Height
Form2.Width = Me.Width
Form2.Show
Me.Enabled = False
Form2.ZOrder 0
End Sub
Repeate as necessary for each form (remember to change form2 to form3 and so on).