|
-
Oct 10th, 2002, 02:06 PM
#1
Thread Starter
Frenzied Member
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:
Private Sub Timer2_Timer()
If Startup.Height > 89 Then
Startup.Height = Startup.Height - 90
Startup.Top = Startup.Top + 45
'Startup.Left = Startup.Left + 45
Startup.Width = Startup.Width - 90
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
-
Oct 10th, 2002, 02:11 PM
#2
So Unbanned
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.
-
Oct 10th, 2002, 02:41 PM
#3
Thread Starter
Frenzied Member
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
-
Oct 10th, 2002, 02:46 PM
#4
Frenzied Member
Heres a simple solution, but maybe not the most efficient!
VB Code:
Private Sub Form_Unload(Cancel As Integer)
Dim i As Integer
i = Me.Width
For i = 0 To Me.Width / 4
Me.Width = Me.Width - 4
Me.Height = Me.Height - 4
Me.Left = Me.Left + 2
Me.Top = Me.Top + 2
Picture1.Left = Picture1.Left - 2
Picture1.Top = Picture1.Top - 2
Next i
End Sub
-
Oct 10th, 2002, 03:46 PM
#5
Thread Starter
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|