基于VB算法+Picture+Timer控件制作的39种动画效果,类似屏保(完整原程序)[5]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 lshdic 的 blog

if jiay(i) = true then yy(0) = yy(0) + 500 else yy(0) = yy(0) - 500
if lihe = false then
p.line (xx(0), yy(0))-(xx(0), yy(0)), color1
lihe = true
else
p.line -(xx(0), yy(0)), color1
end if
case 32  '旋转回忆
if instr(app.path, "\") = len(app.path) then path1 = app.path else path1 = app.path & "\"
str1 = path1 & "甩哥.jpg"
set pic1 = loadpicture(str1): p.cls: wid1 = wid / 2: hei1 = hei / 2
if pos1 < wid then pos1 = pos1 + 10 else pos1 = 0
if pos1 mod 4000 = 0 then
lihe = false
elseif pos1 mod 2000 = 0 then
lihe = true
end if
if lihe = true then
pos2 = pos2 - 30
if pos2 < 40 then lihe = false
else
pos2 = pos2 + 30
end if
p.paintpicture pic1, pos1, hei1 - (pic1.height / 4), pos2
p.paintpicture pic1, wid1 - (pic1.width / 4), pos1 / 2, , (pos2 / 2)
p.paintpicture pic1, wid - pos1, hei1 - (pic1.height / 4), -pos2
p.paintpicture pic1, wid1 - (pic1.width / 4), hei - (pos1 / 2), , -(pos2 / 2)
case 33  '阿基米一
wid1 = wid / 2: hei1 = hei / 2:
if pos2 = 0 then pos2 = round(rnd * 8) + 1
if pos1 < wid1 - (wid1 - hei1) then pos1 = pos1 + 30 else pos1 = 1: pos2 = 0: p.cls: exit sub
for i = 0 to pos1 step pos2
i = i + pos2
p.pset (i * cos(i) + wid1, i * sin(i) + hei1), color1
next
case 34  '阿基米二
wid1 = wid / 2: hei1 = hei / 2:
if pos1 < wid1 then pos1 = pos1 + 10 else pos1 = 1: pos2 = 0: p.cls: exit sub
p.line (wid1, hei1)-(pos1 * cos(pos1) + wid1, pos1 * sin(pos1) + hei1), color1
case 35  '阿基米三
wid1 = wid / 2: hei1 = hei / 2
if pos1 < wid1 then pos1 = pos1 + 10 else pos1 = 20: p.cls: exit sub
p.circle (wid1, hei1), pos1, color1
p.line (wid1, hei1)-(pos1 * cos(pos1) + wid1, pos1 * sin(pos1) + hei1), -color1, bf
case 36  '声波探测
hei1 = hei / 2
if rnd * 100 < 20 then rnd1 = rnd * hei1
if pos1 < wid then pos1 = pos1 + 50 else pos1 = 50: p.cls
if pos1 = 50 then
p.line (pos1, rnd1 * cos(rnd1) + hei1)-(pos1 + 50, rnd1 * sin(rnd1) + hei1), color1
else
p.line -(pos1, rnd1 * cos(rnd1) + hei1), color1
end if
case 37  '光辉四射
wid1 = wid / 2: hei1 = hei / 2: rnd1 = rnd * wid1: rnd2 = hei1 / 5
if pos1 < wid1 then pos1 = pos1 + (rnd * 10) else pos1 = 0
p.line (rnd1 * cos(pos1) + wid1, rnd1 * sin(pos1) + hei1)-((cos(pos1) * rnd2) + wid1, (sin(pos1) * rnd2) + hei1), color1
p.fillcolor = color1
p.circle (wid1, hei1), rnd2, color1
case 38  '网状距阵
if pos1 < wid then pos1 = pos1 + 10 else pos1 = 0: p.cls
color2 = 0
if pos1 = 0 then
pos2 = round(rnd * 7): pos3 = color1
elseif pos1 mod 100 = 0 then
pos2 = round(rnd * 7): pos3 = color1: p.cls
end if
while pos2 = 0
pos2 = round(rnd * 7)
wend
p.fillstyle = pos2: p.fillcolor = pos3
p.line (0, 0)-(wid, hei), pos3, b
case 39  '圆形光线
wid1 = wid / 2: hei1 = hei / 2
if pos1 < wid1 then pos1 = pos1 + 10 else pos1 = 10: p.cls
if pos1 = 10 then
p.line (wid1, hei1)-(wid1, hei1), color1
else
p.line -(pos1 * sin(pos1) + wid1, pos1 * cos(pos1) + hei1), color1
end if
end select

本文关键:picture 算法 动画 屏幕保护 特效
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top