日期:2014-05-18 浏览次数:21034 次
int shockCount = 0; private void tmrShock_Tick(object sender, EventArgs e) { if (shockCount == 0) this.Left -= 5; else if (shockCount == 10) { this.Left += 5; shockCount = 0; tmrShock.Stop(); TopMost = false; } else { if (shockCount % 2 == 1) this.Left += 10; else this.Left -= 10; } shockCount++; }
------解决方案--------------------
控件是没有的... 自己写啦
------解决方案--------------------
哈哈,好东西!
------解决方案--------------------
直接用JS就可以,<script language="javascript">
function shake(n)
{
if(window.top.moveBy)
{
for(i=10;i>0;i--)
{
for(j=n;j>0;j--)
{
window.top.moveBy(0,i);
window.top.moveBy(i,0);
window.top.moveBy(0,-i);
window.top.moveBy(-i,0);
}
}
}
}
</script>
<input onclick="shake(2)" type="button" value="震动页面" />
------解决方案--------------------