Results 1 to 11 of 11

Thread: [RESOLVED] need help with something simple i just cant figure it out

  1. #1

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Resolved [RESOLVED] need help with something simple i just cant figure it out

    ok i have 5 buttons as like a menu and sub menus below them when i click a button in the menu i want it to roll down i know i can do it with a timer but i dont want to use a timer for every sub menu

    kind of like a flash menu

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: need help with something simple i just cant figure it out

    Have a look at this... I made it for you...

    http://www.vbforums.com/showthread.php?t=590754

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  3. #3

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: need help with something simple i just cant figure it out

    i want to do it without using a timer though if you know how please help ..... i have a few picture boxes as sub menus they are different heights

  4. #4
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: need help with something simple i just cant figure it out

    What about using a loop and sleep api ?

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  5. #5
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: need help with something simple i just cant figure it out

    I had updated My code bank submission... Have a look at them... The second method used is, WHILE loop and SLEEP Api

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  6. #6

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: need help with something simple i just cant figure it out

    i can do that but how about if the sub menus are different hegiths?

  7. #7
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: need help with something simple i just cant figure it out

    Ok... that's also updated in my code....

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  8. #8
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: need help with something simple i just cant figure it out


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  9. #9

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: need help with something simple i just cant figure it out

    what do i have wrong? i have the menu but i want the form to resize along with the menu like get bigger and smaller and have a picture box go along with the menu also like i hit the menu a sub menu slides out and a picture stays at the botton of the menu and the form resizes to hold it get what im saying? heres the code

    Code:
    Sub MnuScroLl(Frm As Form, Pc As PictureBox, MinPc As Integer, MaxPc As Integer, MinFrm As Integer, MaxFrm As Integer, BrUp As Integer, BrDown As Integer)
    If Pc.Tag = "opened" Then
        While Pc.Height > MinPc
            Pc.Height = Pc.Height - 40
            Frm.Height = Frm.Height - 40
            FrmMain.Picture1.Top = FrmMain.Picture1.Top - 40
            DoEvents
            Sleep 5
        Wend
        Pc.Tag = "closed"
        Frm.Height = MinFrm
        FrmMain.Picture1.Top = BrDown
    Else
        While Pc.Height < MaxPc
            Pc.Height = Pc.Height + 40
            Frm.Height = Frm.Height - 40
            FrmMain.Picture1.Top = FrmMain.Picture1.Top + 40
            DoEvents
            Sleep 5
        Wend
        Pc.Tag = "opened"
        Frm.Height = MaxFrm
        FrmMain.Picture1.Top = BrUp
    End If
    End Sub

  10. #10

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: need help with something simple i just cant figure it out

    i got ittttttttttt yay


    heres the code i used

    i did remove the sleep function though made it go smoother i think

    Code:
    Sub MnuScroLl(Frm As Form, Pc As PictureBox, MinPc As Integer, MaxPc As Integer, MinFrm As Integer, MaxFrm As Integer, BrUp As Integer, BrDown As Integer)
    If Pc.Tag = "opened" Then
        While Pc.Height > MinPc
            Pc.Height = Pc.Height - 40
            Frm.Height = Frm.Height - 40
            FrmMain.Picture1.Top = FrmMain.Picture1.Top - 40
            DoEvents
        Wend
        Pc.Visible = False
        Pc.Tag = "closed"
        Frm.Height = MinFrm
        FrmMain.Picture1.Top = BrUp
    Else
        While Pc.Height < MaxPc
            Pc.Height = Pc.Height + 40
            Frm.Height = Frm.Height + 40
            FrmMain.Picture1.Top = FrmMain.Picture1.Top + 40
            DoEvents
        Wend
        Pc.Visible = True
        Pc.Tag = "opened"
        Frm.Height = MaxFrm
        FrmMain.Picture1.Top = BrDown
    End If
    End Sub


    thanks for the help man

  11. #11
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: [RESOLVED] need help with something simple i just cant figure it out

    thanks for the help man
    welcome

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

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