I saw a note on the personal homepage of my classmates Feng liqian just now. "I really want to know how this program is written. Please help me !!"
Click here to download the program.
Let's take a look at the simple analysis of this program.
I think this program should be considered in the following aspects:
1. Make the window of the program always display at the beginning. Here we mainly set the z_order of the form. In this program, the window is always at the beginning, and can be implemented by using the form1.bringtofront (); statement.
2. transparent window implementation. The Form class has an attribute called "transparencykey". After the variable of this attribute is set, the form will become transparent as long as it is of the same color. As in the program.
3. Implementation of snow falling. I think this can be achieved with some picturebox. The size of snowflake is achieved by controlling the size of picturebox; the falling of snowflake is achieved by controlling the position of picturebox; the rotation of snowflake may need to be considered. I want to achieve this: when making snowflake materials, do not let the snowflake axis of symmetry orientation horizontal or vertical, so that after rotating picturebox 90 °, the effect of snowflake rotation will appear.
4. Loop playback of music. Add music to the project resources and implement it by using the soundplayer class in the program. For more information, see msdn.
5. Programs are not displayed in the Windows taskbar. You can set the "showintaskbar" attribute of form to false.
6. display the icon on the system tray. You can use the policyicon control in form. The pop-up shortcut menu is implemented using contextmenustrip.
The above is my analysis of that program. I hope you can discuss it together!