- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
窗体最前(Form first)
窗体最前(Form first)
使用系统;
使用system.collections.generic;
使用系统图;
使用system.drawing.drawing2d;
使用system.drawing.imaging;
使用system.runtime.interopservices;
使用system.windows.forms;
命名空间的雪
{
公共部分类Form1:形式
{
私有静态只读随机兰德=新();
私人只读列表雪花 雪花雪花=新的列表();
私有int=0;
私有类的雪花
{
公共浮动旋转;
公众持股RotVelocity;
公共浮量表;
公共浮动;
公众持股XVelocity;
公共浮动;
公众持股YVelocity;
公众形象;
}
图像的屏幕;
公共form1()
{
initializecomponent();
setStyle(controlstyles.userpaint | controlstyles.allpaintinginwmpaint | controlstyles.doublebuffer,真的);
}
private void form1_load(object sender,EventArgs e)
{
屏幕=新的位图(screen.primaryscreen.bounds.width,屏幕。primaryscreen。界限。高度);
}
private void setbackground(图像img)
{
尝试
{
位图位图(bitmap)IMG =;
如果(bitmap.pixelformat!format32bppargb)=像素格式。
{
把新的applicationexception();
}
IntPtr hObject = IntPtr。零;
IntPtr零= IntPtr。零;
IntPtr HDC = Win32。GetDC(IntPtr。零);
IntPtr PTR2 = Win32。CreateCompatibleDC(HDC);
尝试
{
hObject =位图。gethbitmap(颜色。fromargb(0));
零= Win32。SelectObject(PTR2,hObject);
Win32。尺寸:=新的Win32。尺寸(bitmap.width,位图的高度);
Win32。大小psize =;
Win32。点标准=新的Win32点(0, 0);
Win32。点pprsrc =标准;
标准=新的Win32。点(base.left,基地上);
Win32。点pptdst =标准;
win32.blendfunction pblend =新blendfunction() Win32;
pblend.blendop = 0;
pblend.blendflags = 0;
pblend.sourceconstantalpha = 0xff;
pblend。
alphaformat = 1;
Win32。UpdateLayeredWindow(this.handle,HDC,裁判pptdst,裁判psize PTR2,pprsrc,裁判,裁判pblend,0,2);
}
catch(异常exception1)
{
exception1例外=;
抛出异常;
}
最后
{
Win32。ReleaseDC(intptr.zero,HDC);
如果(hObject!= IntPtr。零)
{
Win32。SelectObject(PTR2,零);
Win32。删除对象(hObject);
}
DeleteDC(PTR2)的问题;
}
}
catch(例外E)
{
MessageBox显示(e.message);
}
}
保护覆盖System.Windows.Forms.CreateParams CreateParams
{
得到
{
system.windows.forms.createparams操作= base.createparams;
createparams.exstyle | = 0x80000;
返回操作;
}
}
private void toolstripmenuitem1_click(object sender,EventArgs e)
{
这dispose();
}
private void timer_tick(object sender,EventArgs e)
{
滴答+ +;
如果(刻度%=10=0)
{
雪花=新snowflake();
随机路=新();
下一步(- 20,这个,宽度+ 20);
y=;
s.xvelocity =(浮动)(兰特。nextdouble() - 0.5f)* 2f;
s.yvelocity =(浮
您可能关注的文档
- 直接可以输入的运行命令(Run commands that can be entered directly).doc
- 直接将dvd转换为rmvb的方法(Method for converting DVD directly to RMVB).doc
- 直接序列扩频通信(dsss).doc
- 直接引语与间接引语(Direct Speech and Indirect Speech).doc
- 直接引语变间接引语语法(Direct speech; indirect speech; grammar).doc
- 盘活材料作文备考的最佳策略(Activating materials the best strategy for preparing essays).doc
- 直接引语改为间接引语(The direct speech is changed into indirect speech).doc
- 直接引语转换间接引语(Direct speech; conversion; indirect speech).doc
- 盘点最伤肾的不良生活方式,免费(Inventory of the most harmful kidney lifestyle, free of charge).doc
- 直接引语间接引语讲解(Direct speech; indirect speech; explanation).doc
- 窗口类函数(Window class function).doc
- 窗部位渗漏原因分析(Cause analysis of window leakage).doc
- 窝沟论文大纲(Outline of Waterloo Valley).doc
- 窦性心律失常的治疗方法_(Treatment of sinus arrhythmia _).doc
- 立定跳远技巧(Standing long jump technique).doc
- 立志成才,拼搏进取(Determined to become effective, hard work, enterprising).doc
- 章鱼哥(Octopus brother).doc
- 童年的消逝(The Disappearance of Childhood).doc
- 童年缺少游戏易出现偏执狂症状(Childhood lack of games, prone to paranoia symptoms).doc
- 童聪知识堂-dha与婴幼儿智力和视力发育(Tong Tong knowledge hall -dha and infant intelligence and vision development).doc
文档评论(0)