| |

VerySource

 Forgot password?
 Register
Search
View: 1419|Reply: 10

Where is the selected picture for pictureBox1 saved with VS?

[Copy link]

2

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-5 09:50:01
| Show all posts |Read mode
I have a base class form with a pictureBox1 control on it that shows a picture. How do I write code if I want to replace this picture in a subclass?
Reply

Use magic Report

0

Threads

6

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-5 13:27:01
| Show all posts
Embedded in the resource file,
You can view the code that VS automatically generates, and you can see that the source of the picture is stored in resources.
Reply

Use magic Report

0

Threads

56

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-1-5 13:39:01
| Show all posts
Set pictureBox1 of the base class to protected access permissions to operate directly in the derived class.
Reply

Use magic Report

0

Threads

6

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-5 13:51:01
| Show all posts
Replace picture:

1. The Modifiers property of picturebox1 of the base class should be set to protected or public
2.Can be in subclass picturebox1.Image = Image.FromFile (imageFileName);
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-5 18:54:02
| Show all posts
Embedded in the resource file, right-click and select Import, select the picture you want to replace
Reply

Use magic Report

2

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-1-6 12:39:01
| Show all posts
How to call out embedded resources? For example, embedded c:\a.png
Reply

Use magic Report

2

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-1-9 22:54:01
| Show all posts
up
Reply

Use magic Report

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-1-11 19:45:01
| Show all posts
Same as:navyno2
Reply

Use magic Report

2

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-8-3 09:15:01
| Show all posts
I want to call the content of a resource file in multiple windows. How to add a resource and how to write a call statement?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-3 10:30:01
| Show all posts
MARK
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list