4 Replies - 5533 Views - Last Post: 06 February 2012 - 01:44 PM Rate Topic: -----

#1 Bluezap  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 315
  • Joined: 19-January 12

Slide effect form in Visual Basic

Posted 06 February 2012 - 02:19 AM

Hey does anyone know how to slide a form up while revealing another form
I basically want form1 to slide up when closed by the user and while the slide transition is taking place i want form2 to Gradually show.
Does anyone know how to achieve the slide up transition in Visual Basic 2010?
Is This A Good Question/Topic? 0
  • +

Replies To: Slide effect form in Visual Basic

#2 sela007  Icon User is offline

  • D.I.C Addict

Reputation: 138
  • View blog
  • Posts: 838
  • Joined: 21-December 11

Re: Slide effect form in Visual Basic

Posted 06 February 2012 - 04:57 AM

If you mean opacity transition you
can use combination of timer, some loop and opacity property. For the moving transition,use timer, some loop and location property.
Was This Post Helpful? 1
  • +
  • -

#3 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1051
  • View blog
  • Posts: 4,076
  • Joined: 02-July 08

Re: Slide effect form in Visual Basic

Posted 06 February 2012 - 07:45 AM

For a slide effect you change/decrement the height property (in your case) and you can use a timer or a Do/Loop.
Was This Post Helpful? 0
  • +
  • -

#4 Bluezap  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 315
  • Joined: 19-January 12

Re: Slide effect form in Visual Basic

Posted 06 February 2012 - 01:32 PM

View Postsela007, on 06 February 2012 - 04:57 AM, said:

If you mean opacity transition you
can use combination of timer, some loop and opacity property. For the moving transition,use timer, some loop and location property.


Thank you,
Any sample projects i could take a look at?
Was This Post Helpful? 0
  • +
  • -

#5 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1605
  • View blog
  • Posts: 5,162
  • Joined: 25-September 09

Re: Slide effect form in Visual Basic

Posted 06 February 2012 - 01:44 PM

I think I saw another topic with this subject, you might try searching on some keywords here on this site.

It's really nothing more than incrementing a variable and setting that variable to the form.Height property.

By setting a timer on your form and assigning the incremented height there, it will run once after every tick of the timer.

Just be sure to opt out of the timer if the form reaches a certain size or it will keep growing. So you will need to check to see if the height is at or above its maximum size and if so, stop the timer.

Play around with it, present your code when you get stuck.

EDIT:
Oops, sorry, I thought you were talking about growing a form. But then it's the same concept for opacity just a different property to be incremented.

This post has been edited by CharlieMay: 06 February 2012 - 01:47 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1