by Waty Thierry (60 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Tue 30th March 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Bubble effects on forms
API Declarations
' * Programmer Name : Waty Thierry
' * Web Site : www.geocities.com/ResearchTriangle/6311/
' * E-Mail : [email protected]
' * Date : 13/10/98
' * Time : 10:24
' * Module Name : Form_Module
' * Module Filename : Form.bas
' **********************************************************************
' * Comments :
' * Bubble effects on forms
' **********************************************************************
Option Explicit
Public Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Public Declare Function SetWindowRgn Lib "User32" (ByVal Hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
' * Programmer Name : Waty Thierry
' * Web Site : www.geocities.com/ResearchTriangle/6311/
' * E-Mail : [email protected]
' * Date : 13/10/98
' * Time : 10:24
' * Module Name : Form_Module
' * Module Filename : Form.bas
' **********************************************************************
' * Comments :
' * Bubble effects on forms
' **********************************************************************
Sub Bubble(frm As Form)
frm.Show
Dim a As Integer
Dim b As Integer
Dim C As Integer
Dim d As Integer
Dim e As Integer
Dim f As Integer
Dim w As Integer
Dim x As Integer
Dim Y As Integer
Dim z As Integer
Dim current As Double
Call frm.Move(0, 0)
w = frm.Height: x = frm.Width: Y = frm.Top: z = frm.Left
a = 0: b = 0: C = w: d = x: e = Y: f = z
Do While a < frm.Height / 15 Or b < frm.Width / 15
a = a + 25
b = b + 25
e = e + 70
f = f + 70
If a > frm.Height / 15 Then a = a - 24
If b > frm.Width / 15 Then b = b - 24
Call frm.Move(f, e, d, C)
current = Timer
Do While Timer - current < 0.01
DoEvents
Loop
Call SetWindowRgn(frm.Hwnd, CreateEllipticRgn(0, 0, b, a), True)
Loop
current = Timer
Do While Timer - current < 1
DoEvents
Loop
Call SetWindowRgn(frm.Hwnd, CreateEllipticRgn(0, 0, 0, 0), True)
End Sub