调整图片框中的图片大小

调整图片框中的图片大小

本文介绍了调整图片框中的图片大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好
我使用C#在窗口应用程序中创建自己的项目
我在项目中拍了两个图片框
我已经将图片附加在picturebox1中
现在我想如果我在运行时在picturebox1的图像中选择细化像素,然后自动绘制picturebox1中的所选像素的picture2'图像

我是编程的新手,请帮助我

在此先感谢

Hello
I create my own project in window application using C#
i take two picturebox in my project
i allready attach image in picturebox1
now i want to if i select perticuler pixel in picturebox1''s image at runtime then automatic draw picturebox2''image of selected pixel in picturebox1

i am new in programing so please help me

thanks in advance

推荐答案

khalid khatri写道:
khalid khatri wrote:

我是编程新手,所以请帮助我

i am new in programing so please help me



我建议您购买一本C#书,仔细阅读它,并在尝试此操作之前了解您的一般情况.图片框是一个简单的控件,适用于无法绘制自己的图像的人.如果要与图片进行交互(例如选择像素),则几乎是无用的,您必须弄清楚缩放图像的方式等等,才能弄清楚鼠标的位置(除非您截取了以下内容的屏幕截图)整个桌面,也很浪费).在Paint事件中,您可以绘制图片,然后可以确定鼠标悬停在哪个像素上并获得其颜色.根据您的初学者"的意思,我猜想您可以通过在尝试此基础之前学习一些基础知识来更好地进行学习.



I suggest buying a C# book, working through it, and knowing what you''re doing in general before attempting this. A picture box is a simple control, provided for people who aren''t capable of drawing their own images. If you want to interact with the picture, such as select pixels, it is close to useless, you have to work out how it''s scaling the image, etc, to work out where the mouse is ( unless you take a screenshot of the whole desktop, also wasteful ). The Paint event is where you draw your picture, and then you can work out what pixel the mouse is over and get it''s color. Depending on what you mean by ''beginner'', I''d guess your learning would be better served by learning some basics before attempting this.


这篇关于调整图片框中的图片大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 05:35