Results 1 to 5 of 5

Thread: Someone good with Form effects

  1. #1

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512

    Someone good with Form effects

    I have a form that is full screen and borderless. What im trying to achieve is the surround of the form shrinking while keeping the image static in the middle until it disappears in a small line in the centre of the screen. My problem is that in reducing the width/height/left/top positions the image moves diagonally down the screen as it gets smaller. Is there a way to keep the image statuc while its surrounding edges are reduced?

    Sample code Im using is:

    VB Code:
    1. Private Sub Timer2_Timer()
    2.     If Startup.Height > 89 Then
    3.         Startup.Height = Startup.Height - 90
    4.         Startup.Top = Startup.Top + 45
    5.         'Startup.Left = Startup.Left + 45
    6.         Startup.Width = Startup.Width - 90
    7.     Endif

    To test it you just need to stretch a form as far as it will go right and down til it wont expand any more then give it a picture of 1024x768 resolution and put a timer event on it called Timer2 and set the interval to 1 and enable it

    Thanks for any asistance
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  2. #2
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    You're going to have to either blt, or paintpicture the images.

    Then you should be using the object.move left,top,width,height

    As it calls all-at-once, which will give a much smoother effect.

  3. #3

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512
    Im not too familiar with paintpicture or BLT (yum yum) so its going to have to wait til ive got tim to find the API's and read up on them. Thanks for the tip!
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  4. #4
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545
    Heres a simple solution, but maybe not the most efficient!

    VB Code:
    1. Private Sub Form_Unload(Cancel As Integer)
    2.     Dim i As Integer
    3.     i = Me.Width
    4.     For i = 0 To Me.Width / 4
    5.         Me.Width = Me.Width - 4
    6.         Me.Height = Me.Height - 4
    7.         Me.Left = Me.Left + 2
    8.         Me.Top = Me.Top + 2
    9.         Picture1.Left = Picture1.Left - 2
    10.         Picture1.Top = Picture1.Top - 2
    11.     Next i
    12. End Sub

  5. #5

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512
    Cheers ae_jester ill give it a go!
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

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