Home > Net >  How to use c # picturebox control, according to different images, each image has a corresponding tex
How to use c # picturebox control, according to different images, each image has a corresponding tex

Time:09-21

Can now be looping specified folder pictures, but the corresponding text introduces how to write?

CodePudding user response:

CodePudding user response:

Make a label no yao, and image binding cycle

CodePudding user response:

Upstairs method can ah, don't think so much, if the amount of images and text is not big, can be read into the dictionary; If large amount into the database, the label also can prevent a picturebox above, can realize the request of you,

CodePudding user response:

Have a label on the picture, introduction to text and images for binding operation, if too many pictures, text introduce too much, then write in the database, image name + introduction, recycling program reads the database before, this memory would be wrong to corresponding pictures and introduction, after each image transform will assign values to the corresponding some text on the label,

CodePudding user response:

Can use tooltips

CodePudding user response:

Method is varied, can also use a control, also can draw on the pb, may also be displayed in the image above to draw good display img again, even more convenient to illustrate and match them with the pictures, text position and size of what can be saved, can also write a put them in a file format files, can also be lazy can save something such as XML,

CodePudding user response:

Of new, I don't know how to label and binding images, realizes the cycle picture at the same time the text label can change in real time, with the bosses to write code? Don't use the database

CodePudding user response:

Introduce no special characters, is introduced as the image file name, and then to access to the file name on the label
Enclosing label1. Text=Path. GetFileNameWithoutExtension (Path);
  •  Tags:  
  • C#
  • Related