C # Handwriting recognition finishing

Source: Internet
Author: User

Because of C # not familiar, so ask the classmate (thank Deng Classmate ~), asked Baidu, asked Google, finally succeeded.

1.char

First of all, C # 's char is encoded in Unicode. 2 bytes. At first I always thought it was an ASCII code, checking the ASCII table. Depressed...

Byte is 1 bytes.

Char ch= ' a ';

2. Identify what form to store.

BMP is a bitmap, which is stored in pixels.

3.c# What classes are able to import BMP graphs.

Bitmap

System.Drawing

Bitmap map=new Bitmap ("filename");

Bitmap map1=new Bitmap (map,width,height);

Map.save ("filename"); Store in original format

If you want to paint on the bitmap, you should Graphics g=graphics.fromimage (map);

There is another problem, bitmap is an abstract concept, we need to draw in which entity place.

PictureBox has an image attribute that is bitmap, so it can be drawn based on this.

PictureBox attributes have a change in the background color, changed to white.

4. Matching issues

In fact, the matching problem is very simple, because bitmap has a getpixel (x,y) can return color we only do a monochrome map, so it is enough.

2 layers of iteration can be done.

5. Clear

Clear in fact as long as bitmap.dispose ();

6. Message passing between forms

Try one of the easiest ways, because C # has no global variables, so you can use static to solve them.

7. Toggle between forms

Form2 form=new Form2 ();

Form.ShowDialog ();

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.