Results 1 to 17 of 17

Thread: [RESOLVED] Different steps problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Posts
    6

    Resolved [RESOLVED] Different steps problem

    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) :
    Code:
    Form2.Enabled = True
    Form2.Visible = True
    Form1.Enabled = False
    Form1.Visible = False
    But on the bottom taskbar it looks like im closing it and re-opening it. I want it to be solid.

  2. #2

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Posts
    6

    Re: Different steps problem

    No I still get the same problem of it looking like it is getting opened and closed on the taskbar (im using xp)

  4. #4

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Posts
    6

    Re: Different steps problem

    Yea thats what I want. I guess its because you only have 1 form in the right side bar area.. I have 4 forms there. How would it like yours?

  6. #6
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Re: Different steps problem

    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.



  7. #7
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Different steps problem

    Quote Originally Posted by PleaseProceed
    Yea thats what I want. I guess its because you only have 1 form in the right side bar area.. I have 4 forms there. How would it like yours?
    Did you look at my code? if you did you'd see that I use frames for the steps or you could use pictureboxes like some1uk03 suggested.

  8. #8
    Junior Member
    Join Date
    Mar 2009
    Posts
    28

    Re: Different steps problem

    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?

  9. #9

  10. #10
    Junior Member
    Join Date
    Mar 2009
    Posts
    28

    Re: Different steps problem

    Im not good at editing the code and for the picture boxes I cant place buttons on them because you cant see them..

  11. #11

  12. #12
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Different steps problem

    Quote Originally Posted by ara123
    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.

  13. #13
    Frenzied Member
    Join Date
    Mar 2009
    Posts
    1,182

    Re: Different steps problem

    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.

    Good Luck

  14. #14

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Posts
    6

    Re: Different steps problem

    So how would I do the subquential thing? or could someone write a code like the first code MartinLiss wrote in that program except for picturebox's?
    Last edited by PleaseProceed; Mar 16th, 2009 at 06:05 PM.

  15. #15
    Frenzied Member
    Join Date
    Mar 2009
    Posts
    1,182

    Re: Different steps problem

    For a MDI example...

    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).

    Run/Test

    Good Luck

  16. #16
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Different steps problem

    Quote Originally Posted by PleaseProceed View Post
    So how would I do the subquential thing? or could someone write a code like the first code MartinLiss wrote in that program except for picturebox's?
    Here you go.
    Attached Files Attached Files

  17. #17

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Posts
    6

    Re: Different steps problem

    Thanks so much everyone.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width