USUÁRIO:      SENHA:        SALVAR LOGIN ?    Adicione o VBWEB na sua lista de favoritos   Fale conosco 

 

  Dicas

  Visual Basic    (ActiveX/Controles/DLL)

Título da Dica:  Efeito no Form
Postada em 1/3/2007 por Edinei      Clique aqui para enviar email para o autor  neisjb@hotmail.com
'no form

Private Sub Form_Load()
ExplodeForm Me, 20, 2
End Sub

Sub ExplodeForm(frm As Form, Optional ByVal lNumSteps As Long = 25, _
Optional ByVal lStepDuration As Long)
Dim sngLeft As Single, sngTop As Single
Dim sngHeight As Single, sngWidth As Single
Dim sngNewHeight As Single, sngNewWidth As Single
Dim sngHeightStep As Single, sngWidthStep As Single
Dim iStep As Long

On Error Resume Next


If frm.WindowState <> vbNormal Then Exit Sub


sngLeft = frm.Left
sngTop = frm.Top
sngHeight = frm.Height
sngWidth = frm.Width

sngHeightStep = sngHeight / lNumSteps
sngWidthStep = sngWidth / lNumSteps


For iStep = 1 To lNumSteps

sngNewHeight = sngNewHeight + sngHeightStep
sngNewWidth = sngNewWidth + sngWidthStep

frm.Move sngLeft + (sngWidth - sngNewWidth) / 2, _
sngTop + (sngHeight - sngNewHeight) / 2, sngNewWidth, sngNewHeight
frm.Visible = True
frm.Refresh

Sleep lStepDuration
Next


frm.Move sngLeft, sngTop, sngWidth, sngHeight

End Sub



'Agora em general declarations,

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
 


CyberWEB Network Ltda.    © Copyright 2000-2024   -   Todos os direitos reservados.
Powered by HostingZone - A melhor hospedagem para seu site
Topo da página