"
宋体"
,
),newSolidBrushColorRed),newPointFScreenPrimaryScreenBoundsWidth
,ScreenPrimaryScreenBoundsHeight
))
elseDesktopGraphicsDrawStringText,newFont"
宋体"
,
),newSolidBrushColorGreen),newPointFScreenPrimaryScreenBoundsWidth
,ScreenPrimaryScreenBoundsHeight
))
SnowTimerTag=
ConvertToInt
SnowTimerTag)
forinti=
i<
SnowPointsCount
i++){DesktopGraphicsDrawImageBmp,SnowPoints[i]X,SnowPoints[i]Y,newRectangleSnowPoints[i],PbSnowSize),GraphicsUnitPixel)
SnowPoints[i]=newPointSnowPoints[i]X,SnowPoints[i]Y+SnowRate[i])
ifSnowPoints[i]Y>
ScreenPrimaryScreenBoundsB惠普装xpottom)SnowPoints[i]=newPointSnowPoints[i]X,
)
DesktopGraphicsDrawImagePbSnowImage,SnowPoints[i])
PbSnowImage小雪花图片}DesktopGraphicsDispose)
}#endregion#regionvoidBtnStart_Clickobjectsender,EventArgse)下雪<
summary>
开始下雪<
summary>
<
paramname="
sender"
>
按钮本身<
param>
<
paramname="
e"
>
按钮<
param>
voidBtnStart_Clickobjectsender,EventArgse){SnowPointsClear)
RandomR=newRandom)
forinti=
i<
i++){SnowPointsAddnewPointRNextScreenPrimaryScreenBoundsWidth),RNextScreenPrimaryScreenBoundsHeight)))
SnowRateAddRNext
))
}ShowDesktop)
thisWindo