target: frmMain to start as small icon at bottomLeft slowly go to right,
then to screen center, then expands to fits full size.
Code is below:
------------------------------------------------------------------------
Option Explicit
Private animStage As Integer
Private easing As Double
Private Sub Form_Load()
easing = 0.18
animStage = 1
' Start bottom-left
Me.Left = 0
Me.Top = Application.CurrentProject.Height - Me.Height
Me.TimerInterval = 15
End Sub
Private Sub Form_Timer()
Dim dx As Long
Dim dy As Long
Dim targetLeft As Long
Dim targetTop As Long
Select Case animStage
' Move right (ease)
Case 1
targetLeft = (Application.CurrentProject.Width - Me.Width) \ 2
dx = targetLeft - Me.Left
Me.Left = Me.Left + dx * easing
If Abs(dx) < 20 Then animStage = 2
' Move up (ease)
Case 2
targetTop = (Application.CurrentProject.Height - Me.Height) \ 2
dy = targetTop - Me.Top
Me.Top = Me.Top + dy * easing
If Abs(dy) < 20 Then animStage = 3
' Final snap + stop
Case 3
Me.Left = (Application.CurrentProject.Width - Me.Width) \ 2
Me.Top = (Application.CurrentProject.Height - Me.Height) \ 2
Me.TimerInterval = 0
End Select
End Sub
--------------------------------------------------------
But I get the error of "data member not found" please help if possible.
Will be grateful.
Sasson Vedadian
_._,_._,_
Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#116729) | Reply to Group | Reply to Sender | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]
_._,_._,_
Tidak ada komentar:
Posting Komentar