Option Explicit DefInt A-Y Rem ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ Rem [email protected] 1999-04-27 ? Rem ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ Rem ?The Hook Software ? Rem Rem 儍儍? ? 儍儍? 儍儍? 儍儍? Rem ? ? ? ? ? Rem 儍 ? ?儍? ?儍? 儍儍 Rem ? ? ? ? ? ? ? Rem ? ? 儍儍? 儍儍? 儍儍? Rem Rem 儍儍? ? ? ? ? 儍儍 Rem ? ? ? ? ? ? ? Rem 儍 ? ? ? ? 儍儍 Rem ? ? ? ? ? ? ? ? Rem ? ? 儍儍? 儍儍? ? ? Rem ' GDI functions: Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal XSrc As Long, ByVal YSrc As Long, ByVal dwRop As Long) As Long Private Const SRCCOPY = &HCC0020 ' (DWORD) dest = source Private Const PIXEL = 3 Const low = 6 Const Xlow = 0 Const Ylow = 0 Const Xhigh = 640 Const Yhigh = 480 Const Xlow1 = 320 Const Xhigh1 = 320Dim Ico$ Dim IconFileName$ Dim path As StringDim a1 As Integer Dim a2 As Integer Dim a3 As Integer Dim a4 As Integer Dim b1 As Integer Dim b2 As Integer Dim b3 As Integer Dim b4 As Integer Dim c1 As Integer Dim c2 As Integer Dim c3 As Integer Dim c4 As Integer Dim CurX As Integer Dim CurY As Integer Dim d1 As Integer Dim d2 As Integer Dim d3 As Integer Dim d4 As Integer Dim hi As Integer Dim k As Integer Dim lo As Integer Dim m As Integer Dim max As Integer Dim repeats As Integer Dim speed As Integer Dim v1 As Integer Dim v1b As Integer Dim v2 As Integer Dim v2b As Integer Dim v3 As Integer Dim v3b As Integer Dim v4 As Integer Dim v4b As Integer Dim var1 As Integer Dim var2 As Integer Dim LocX1 As Integer Dim LocX2 As Integer Dim LocY1 As Integer Dim LocY2 As Integer Dim z As Integer Dim X% Dim Y% Dim hDestDC% Dim nWidth% Dim nHeight% Dim hSrcDC% Dim XSrc% Dim YSrc% Dim dwRop& Dim Suc& Dim I As Integer Dim J As Integer Dim s1!, s2!Sub PresentIcon() ' Assign information of the destination bitmap. ' Note that Bitblt requires coordination in pixels. X% = 0 Y% = 0 nWidth% = 32 nHeight% = 32 ' Assign the SRCCOPY constant to the Raster operation. dwRop& = &HCC0020Caleido.Picture = LoadPicture(IconFileName$) Caleido.ScaleMode = PIXEL hDestDC% = Caleido.hDC ' Assign information of the source bitmap. hSrcDC% = Caleido.hDC XSrc% = 0 YSrc% = 0For I% = 0 To 479 Step 32 For J% = 0 To 639 Step 32 Rem Call ShowIcon(IconFileName$, J%, I%) X% = J% Y% = I% Suc& = BitBlt&(hDestDC%, X%, Y%, nWidth%, nHeight%, hSrcDC%, XSrc%, YSrc%, dwRop&) Refresh Next J% Next I%End Sub Private Sub Form_Click() Static BeenHere As Boolean If BeenHere Then GoTo Ending Cls PresentIcon FontSize = 48 CurrentY = 204 CurrentX = 8 Line (64, 216)-(575, 295), QBColor(1), BF ForeColor = QBColor(14) CurrentX = 84 CurrentY = 216 Print "Caleido Ending" BeenHere = True Sleep 5 Ending: Unload Me End End SubPrivate Sub Form_Load() Caleido.Show IconMake Caleido.Icon = LoadPicture(IconFileName$) Main End Sub Private Sub Main() Randomize Timer speed = 10 CurX = 0 CurY = 0 Do '-load random colors lo = 1 hi = 14 '------------- k = 4 max = 74 Line (Xlow, Ylow)-(Xhigh, Yhigh), QBColor(15), BF 'white background '----------------------------- 'starting coordinates a1 = Rnd * Xhigh b1 = Rnd * Yhigh a2 = Rnd * Xhigh b2 = Rnd * Yhigh '------------- v1 = 2 v2 = 2 v3 = 2 v4 = 1 '------------- c1 = a1 d1 = b1 c2 = a2 d2 = b2 '---------------- v1b = 2 v2b = 2 v3b = 2 v4b = 1For repeats = 1 To 4000 DoEvents '----------------------- 'mirror coordinates a3 = Xhigh - a1 a4 = Xhigh - a2 b3 = Yhigh - b1 b4 = Yhigh - b2 '------------ c3 = Xhigh - c1 c4 = Xhigh - c2 d3 = Yhigh - d1 d4 = Yhigh - d2 '------------ 'animated lines for each part of screen Line (a1, b1)-(a2, b2), QBColor(k) Line (a3, b1)-(a4, b2), QBColor(k) Line (a1, b3)-(a2, b4), QBColor(k) Line (a3, b3)-(a4, b4), QBColor(k) '------------------------ a1 = a1 - v1 a2 = a2 + v2 b1 = b1 + v3 b2 = b2 - v4'------bounce effect------ If a1 > Xhigh Then v1 = 2: k = Rnd * 15 If a1 < low Then v1 = -2: k = Rnd * 15 If a2 > Xhigh Then v2 = -2: k = Rnd * 15 If a2 < low Then v2 = 2: k = Rnd * 15 If b1 > Yhigh Then v3 = -2: k = Rnd * 15 If b1 < low Then v3 = 2: k = Rnd * 15 If b2 > Yhigh Then v4 = 2: k = Rnd * 15 If b2 < low Then v4 = -1: k = Rnd * 15'---white lines---- If repeats > max Then Line (c1, d1)-(c2, d2), QBColor(15) Line (c3, d1)-(c4, d2), QBColor(15) Line (c1, d3)-(c2, d4), QBColor(15) Line (c3, d3)-(c4, d4), QBColor(15) '-------------------------- c1 = c1 - v1b c2 = c2 + v2b d1 = d1 + v3b d2 = d2 - v4b '------------ If c1 > Xhigh Then v1b = 2 If c1 < low Then v1b = -2 If c2 > Xhigh Then v2b = -2 If c2 < low Then v2b = 2 If d1 > Yhigh Then v3b = -2 If d1 < low Then v3b = 2 If d2 > Yhigh Then v4b = 2 If d2 < low Then v4b = -1 End If '---------------------- For z = 1 To 100 * speed Next z Next repeats Sleep 1'--Clear Screen in Black---- '----------------- For m = 1 To 325 DoEvents Line (Xlow, Ylow)-(Xhigh, Yhigh), QBColor(0), B LocX1 = LocX1 + var1 LocX2 = LocX2 - var2 For z = 1 To 50 * speed Next z Next m'---Clear Screen in White---- LocX1 = Xlow1 LocX2 = Xhigh1 var1 = 1 var2 = 1 '----------------- For m = 1 To 325 DoEvents Line (LocX1, Ylow)-(LocX2, Yhigh), QBColor(15), B LocX1 = LocX1 - var1 LocX2 = LocX2 + var2 For z = 1 To 50 * speed Next z Next m Loop End SubPrivate Sub Sleep(Seconds As Double) Dim TempTime As Double TempTime = Timer While Timer - TempTime < Seconds DoEvents If Timer < TempTime Then TempTime = TempTime - 24# * 3600# End If Wend End Sub
DefInt A-Y
Rem ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
Rem [email protected] 1999-04-27 ?
Rem ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
Rem ?The Hook Software ?
Rem
Rem 儍儍? ? 儍儍? 儍儍? 儍儍?
Rem ? ? ? ? ?
Rem 儍 ? ?儍? ?儍? 儍儍
Rem ? ? ? ? ? ? ?
Rem ? ? 儍儍? 儍儍? 儍儍?
Rem
Rem 儍儍? ? ? ? ? 儍儍
Rem ? ? ? ? ? ? ?
Rem 儍 ? ? ? ? 儍儍
Rem ? ? ? ? ? ? ? ?
Rem ? ? 儍儍? 儍儍? ? ?
Rem
' GDI functions:
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal XSrc As Long, ByVal YSrc As Long, ByVal dwRop As Long) As Long
Private Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
Private Const PIXEL = 3
Const low = 6
Const Xlow = 0
Const Ylow = 0
Const Xhigh = 640
Const Yhigh = 480
Const Xlow1 = 320
Const Xhigh1 = 320Dim Ico$
Dim IconFileName$
Dim path As StringDim a1 As Integer
Dim a2 As Integer
Dim a3 As Integer
Dim a4 As Integer
Dim b1 As Integer
Dim b2 As Integer
Dim b3 As Integer
Dim b4 As Integer
Dim c1 As Integer
Dim c2 As Integer
Dim c3 As Integer
Dim c4 As Integer
Dim CurX As Integer
Dim CurY As Integer
Dim d1 As Integer
Dim d2 As Integer
Dim d3 As Integer
Dim d4 As Integer
Dim hi As Integer
Dim k As Integer
Dim lo As Integer
Dim m As Integer
Dim max As Integer
Dim repeats As Integer
Dim speed As Integer
Dim v1 As Integer
Dim v1b As Integer
Dim v2 As Integer
Dim v2b As Integer
Dim v3 As Integer
Dim v3b As Integer
Dim v4 As Integer
Dim v4b As Integer
Dim var1 As Integer
Dim var2 As Integer
Dim LocX1 As Integer
Dim LocX2 As Integer
Dim LocY1 As Integer
Dim LocY2 As Integer
Dim z As Integer
Dim X%
Dim Y%
Dim hDestDC%
Dim nWidth%
Dim nHeight%
Dim hSrcDC%
Dim XSrc%
Dim YSrc%
Dim dwRop&
Dim Suc&
Dim I As Integer
Dim J As Integer
Dim s1!, s2!Sub PresentIcon()
' Assign information of the destination bitmap.
' Note that Bitblt requires coordination in pixels.
X% = 0
Y% = 0
nWidth% = 32
nHeight% = 32
' Assign the SRCCOPY constant to the Raster operation.
dwRop& = &HCC0020Caleido.Picture = LoadPicture(IconFileName$)
Caleido.ScaleMode = PIXEL
hDestDC% = Caleido.hDC
' Assign information of the source bitmap.
hSrcDC% = Caleido.hDC
XSrc% = 0
YSrc% = 0For I% = 0 To 479 Step 32
For J% = 0 To 639 Step 32
Rem Call ShowIcon(IconFileName$, J%, I%)
X% = J%
Y% = I%
Suc& = BitBlt&(hDestDC%, X%, Y%, nWidth%, nHeight%, hSrcDC%, XSrc%, YSrc%, dwRop&)
Refresh
Next J%
Next I%End Sub
Private Sub Form_Click()
Static BeenHere As Boolean
If BeenHere Then GoTo Ending
Cls
PresentIcon
FontSize = 48
CurrentY = 204
CurrentX = 8
Line (64, 216)-(575, 295), QBColor(1), BF
ForeColor = QBColor(14)
CurrentX = 84
CurrentY = 216
Print "Caleido Ending"
BeenHere = True
Sleep 5
Ending:
Unload Me
End
End SubPrivate Sub Form_Load()
Caleido.Show
IconMake
Caleido.Icon = LoadPicture(IconFileName$)
Main
End Sub
Private Sub Main()
Randomize Timer
speed = 10
CurX = 0
CurY = 0
Do
'-load random colors
lo = 1
hi = 14
'-------------
k = 4
max = 74
Line (Xlow, Ylow)-(Xhigh, Yhigh), QBColor(15), BF 'white background
'-----------------------------
'starting coordinates
a1 = Rnd * Xhigh
b1 = Rnd * Yhigh
a2 = Rnd * Xhigh
b2 = Rnd * Yhigh
'-------------
v1 = 2
v2 = 2
v3 = 2
v4 = 1
'-------------
c1 = a1
d1 = b1
c2 = a2
d2 = b2
'----------------
v1b = 2
v2b = 2
v3b = 2
v4b = 1For repeats = 1 To 4000
DoEvents
'-----------------------
'mirror coordinates
a3 = Xhigh - a1
a4 = Xhigh - a2
b3 = Yhigh - b1
b4 = Yhigh - b2
'------------
c3 = Xhigh - c1
c4 = Xhigh - c2
d3 = Yhigh - d1
d4 = Yhigh - d2
'------------
'animated lines for each part of screen
Line (a1, b1)-(a2, b2), QBColor(k)
Line (a3, b1)-(a4, b2), QBColor(k)
Line (a1, b3)-(a2, b4), QBColor(k)
Line (a3, b3)-(a4, b4), QBColor(k)
'------------------------
a1 = a1 - v1
a2 = a2 + v2
b1 = b1 + v3
b2 = b2 - v4'------bounce effect------
If a1 > Xhigh Then v1 = 2: k = Rnd * 15
If a1 < low Then v1 = -2: k = Rnd * 15
If a2 > Xhigh Then v2 = -2: k = Rnd * 15
If a2 < low Then v2 = 2: k = Rnd * 15
If b1 > Yhigh Then v3 = -2: k = Rnd * 15
If b1 < low Then v3 = 2: k = Rnd * 15
If b2 > Yhigh Then v4 = 2: k = Rnd * 15
If b2 < low Then v4 = -1: k = Rnd * 15'---white lines----
If repeats > max Then
Line (c1, d1)-(c2, d2), QBColor(15)
Line (c3, d1)-(c4, d2), QBColor(15)
Line (c1, d3)-(c2, d4), QBColor(15)
Line (c3, d3)-(c4, d4), QBColor(15)
'--------------------------
c1 = c1 - v1b
c2 = c2 + v2b
d1 = d1 + v3b
d2 = d2 - v4b
'------------
If c1 > Xhigh Then v1b = 2
If c1 < low Then v1b = -2
If c2 > Xhigh Then v2b = -2
If c2 < low Then v2b = 2
If d1 > Yhigh Then v3b = -2
If d1 < low Then v3b = 2
If d2 > Yhigh Then v4b = 2
If d2 < low Then v4b = -1
End If
'----------------------
For z = 1 To 100 * speed
Next z
Next repeats
Sleep 1'--Clear Screen in Black----
'-----------------
For m = 1 To 325
DoEvents
Line (Xlow, Ylow)-(Xhigh, Yhigh), QBColor(0), B
LocX1 = LocX1 + var1
LocX2 = LocX2 - var2
For z = 1 To 50 * speed
Next z
Next m'---Clear Screen in White----
LocX1 = Xlow1
LocX2 = Xhigh1
var1 = 1
var2 = 1
'-----------------
For m = 1 To 325
DoEvents
Line (LocX1, Ylow)-(LocX2, Yhigh), QBColor(15), B
LocX1 = LocX1 - var1
LocX2 = LocX2 + var2
For z = 1 To 50 * speed
Next z
Next m
Loop
End SubPrivate Sub Sleep(Seconds As Double)
Dim TempTime As Double
TempTime = Timer
While Timer - TempTime < Seconds
DoEvents
If Timer < TempTime Then
TempTime = TempTime - 24# * 3600#
End If
Wend
End Sub
Rem
Rem
Rem Remove this snippet when the ico is made
Rem An Icon structure:
Rem Head = 126 bytes, the last 64 bytes are color table
Rem
Rem Body = 512 bytes , a 16 (cols) * 32 (rows) Down up Color Chart
Rem each byte in cols are two color mixed, use div 16/and 15 for extract
Rem Tail =128 bytes all null
Rem
Rem
path = App.path
If Right$(path, 1) <> "\" Then path = path + "\"
IconFileName$ = path + "caleido.ico"
Ico$ = String$(766, 0)
Mid$(Ico$, 3, 1) = Chr$(1)
Mid$(Ico$, 5, 1) = Chr$(1)
Mid$(Ico$, 7, 1) = Chr$(32)
Mid$(Ico$, 8, 1) = Chr$(32)
Mid$(Ico$, 9, 1) = Chr$(16)
Mid$(Ico$, 15, 1) = Chr$(232)
Mid$(Ico$, 16, 1) = Chr$(2)
Mid$(Ico$, 19, 1) = Chr$(22)
Mid$(Ico$, 23, 1) = Chr$(40)
Mid$(Ico$, 27, 1) = Chr$(32)
Mid$(Ico$, 31, 1) = Chr$(64)
Mid$(Ico$, 35, 1) = Chr$(1)
Mid$(Ico$, 37, 1) = Chr$(4)
Mid$(Ico$, 69, 1) = Chr$(128)
Mid$(Ico$, 72, 1) = Chr$(128)
Mid$(Ico$, 76, 1) = Chr$(128)
Mid$(Ico$, 77, 1) = Chr$(128)
Mid$(Ico$, 79, 1) = Chr$(128)
Mid$(Ico$, 83, 1) = Chr$(128)
Mid$(Ico$, 85, 1) = Chr$(128)
Mid$(Ico$, 87, 1) = Chr$(128)
Mid$(Ico$, 88, 1) = Chr$(128)
Mid$(Ico$, 91, 1) = Chr$(192)
Mid$(Ico$, 92, 1) = Chr$(192)
Mid$(Ico$, 93, 1) = Chr$(192)
Mid$(Ico$, 95, 1) = Chr$(128)
Mid$(Ico$, 96, 1) = Chr$(128)
Mid$(Ico$, 97, 1) = Chr$(128)
Mid$(Ico$, 101, 1) = Chr$(255)
Mid$(Ico$, 104, 1) = Chr$(255)
Mid$(Ico$, 108, 1) = Chr$(255)
Mid$(Ico$, 109, 1) = Chr$(255)
Mid$(Ico$, 111, 1) = Chr$(255)
Mid$(Ico$, 115, 1) = Chr$(255)
Mid$(Ico$, 117, 1) = Chr$(255)
Mid$(Ico$, 119, 1) = Chr$(255)
Mid$(Ico$, 120, 1) = Chr$(255)
Mid$(Ico$, 123, 1) = Chr$(255)
Mid$(Ico$, 124, 1) = Chr$(255)
Mid$(Ico$, 125, 1) = Chr$(255)
Mid$(Ico$, 127, 1) = Chr$(79)
Mid$(Ico$, 128, 1) = Chr$(255)
Mid$(Ico$, 129, 1) = Chr$(255)
Mid$(Ico$, 130, 1) = Chr$(255)
Mid$(Ico$, 131, 1) = Chr$(79)
Mid$(Ico$, 132, 1) = Chr$(255)
Mid$(Ico$, 133, 1) = Chr$(255)
Mid$(Ico$, 134, 1) = Chr$(255)
Mid$(Ico$, 135, 1) = Chr$(79)
Mid$(Ico$, 136, 1) = Chr$(255)
Mid$(Ico$, 137, 1) = Chr$(255)
Mid$(Ico$, 138, 1) = Chr$(255)
Mid$(Ico$, 139, 1) = Chr$(79)
Mid$(Ico$, 140, 1) = Chr$(255)
Mid$(Ico$, 141, 1) = Chr$(255)
Mid$(Ico$, 142, 1) = Chr$(255)
Mid$(Ico$, 143, 1) = Chr$(244)
Mid$(Ico$, 144, 1) = Chr$(255)
Mid$(Ico$, 145, 1) = Chr$(255)
Mid$(Ico$, 146, 1) = Chr$(255)
Mid$(Ico$, 148, 1) = Chr$(255)
Mid$(Ico$, 149, 1) = Chr$(255)
Mid$(Ico$, 150, 1) = Chr$(240)
Mid$(Ico$, 154, 1) = Chr$(15)
Mid$(Ico$, 155, 1) = Chr$(244)
Mid$(Ico$, 156, 1) = Chr$(255)
Mid$(Ico$, 157, 1) = Chr$(255)
Mid$(Ico$, 158, 1) = Chr$(255)
Mid$(Ico$, 159, 1) = Chr$(255)
Mid$(Ico$, 160, 1) = Chr$(79)
Mid$(Ico$, 161, 1) = Chr$(255)
Mid$(Ico$, 162, 1) = Chr$(255)
Mid$(Ico$, 163, 1) = Chr$(255)
Mid$(Ico$, 164, 1) = Chr$(79)
Mid$(Ico$, 165, 1) = Chr$(240)
Mid$(Ico$, 166, 1) = Chr$(1)
Mid$(Ico$, 167, 1) = Chr$(16)
Mid$(Ico$, 168, 1) = Chr$(1)
Mid$(Ico$, 169, 1) = Chr$(16)
Mid$(Ico$, 171, 1) = Chr$(15)
Mid$(Ico$, 172, 1) = Chr$(79)
Mid$(Ico$, 173, 1) = Chr$(255)
Mid$(Ico$, 174, 1) = Chr$(255)
Mid$(Ico$, 175, 1) = Chr$(255)
Mid$(Ico$, 176, 1) = Chr$(244)
Mid$(Ico$, 177, 1) = Chr$(255)
Mid$(Ico$, 180, 1) = Chr$(4)
Mid$(Ico$, 181, 1) = Chr$(1)
Mid$(Ico$, 182, 1) = Chr$(16)
Mid$(Ico$, 183, 1) = Chr$(1)
Mid$(Ico$, 184, 1) = Chr$(16)
Mid$(Ico$, 185, 1) = Chr$(17)
Mid$(Ico$, 186, 1) = Chr$(16)
Mid$(Ico$, 188, 1) = Chr$(244)
Mid$(Ico$, 189, 1) = Chr$(255)
Mid$(Ico$, 190, 1) = Chr$(255)
Mid$(Ico$, 191, 1) = Chr$(255)
Mid$(Ico$, 192, 1) = Chr$(244)
Mid$(Ico$, 194, 1) = Chr$(17)
Mid$(Ico$, 195, 1) = Chr$(16)
Mid$(Ico$, 196, 1) = Chr$(208)
Mid$(Ico$, 197, 1) = Chr$(16)
Mid$(Ico$, 198, 1) = Chr$(1)
Mid$(Ico$, 199, 1) = Chr$(17)
Mid$(Ico$, 200, 1) = Chr$(17)
Mid$(Ico$, 201, 1) = Chr$(17)
Mid$(Ico$, 202, 1) = Chr$(4)
Mid$(Ico$, 203, 1) = Chr$(16)
Mid$(Ico$, 204, 1) = Chr$(244)
Mid$(Ico$, 205, 1) = Chr$(79)
Mid$(Ico$, 206, 1) = Chr$(255)
Mid$(Ico$, 207, 1) = Chr$(255)
Mid$(Ico$, 208, 1) = Chr$(64)
Mid$(Ico$, 209, 1) = Chr$(17)
Mid$(Ico$, 210, 1) = Chr$(16)
Mid$(Ico$, 211, 1) = Chr$(17)
Mid$(Ico$, 212, 1) = Chr$(16)
Mid$(Ico$, 213, 1) = Chr$(17)
Mid$(Ico$, 214, 1) = Chr$(17)
Mid$(Ico$, 215, 1) = Chr$(1)
Mid$(Ico$, 216, 1) = Chr$(17)
Mid$(Ico$, 217, 1) = Chr$(17)
Mid$(Ico$, 218, 1) = Chr$(16)
Mid$(Ico$, 219, 1) = Chr$(17)
Mid$(Ico$, 220, 1) = Chr$(15)
Mid$(Ico$, 221, 1) = Chr$(244)
Mid$(Ico$, 222, 1) = Chr$(255)
Mid$(Ico$, 223, 1) = Chr$(244)
Mid$(Ico$, 224, 1) = Chr$(1)
你的图片找不到