C # image Selector

Source: Internet
Author: User

Tomorrow we will go home from holiday. Haha, the B/S project that has been busy for more than a month has finally come to an end. After the Chinese New Year, you can continue to study GDI and GIS on your own. Haha, you should write a blog before you go home on holiday, or it will take a long time to come.

Anyone who has used the CAD slide function knows that there is an image manager that can display images. to put it bluntly, the SLD format file is similar to the QQ Avatar selection function. Haha, it was a long time ago that this function is very good and can be used.

Use C # to customize a function-like control. Haha, look at the figure.

It seems a little problematic, haha.

The code for adding images to the background is also very easy. A simple look.

Code

Private void initimageselector ()
{
Bitmap bit1 = new Bitmap (@ "F: \ images \ 163.png ");
Bitmap bit2 = new Bitmap (@ "F: \ images \ Mingxin technology .png ");
Bitmap bit3 = new Bitmap (@ "F: \ images \ parents_logo.png ");
Bitmap bit4 = new Bitmap (@ "F: \ images \ alert_11.png ");
Bitmap bit5 = new Bitmap (@ "F: \ images \ 3-11.png ");
This. selectormain1.additem (bit1, "Image 1 ");
This. selectormain1.additem (bit2, "Image 2 ");
This. selectormain1.additem (bit3, "Image 3 ");
This. selectormain1.additem (bit4, "Image 4 ");
This. selectormain1.additem (bit5, "image 5 ");
}

As for the control code, it won't be pasted. Haha, you can send it via email if necessary. Haha !!

Supplement:

It seems that the buttons used above are not very beautiful. Double-click the button to display the image information, which may be more practical. As shown below.

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.