Analyze the implementation of a small program

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.