如何在另一个图片框中打开一个图片框图像 [英] how to open one picture box image in another picture box

查看:50
本文介绍了如何在另一个图片框中打开一个图片框图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i已经在picturebox1中有图像,我在同一个项目中有另一个表单,这是picturebox2,只要我根据自己的知识尝试使用这段代码,它不能正常工作需要帮助..谢谢你...



Form2.picturebox2.image = Form1(Me).picturebox1,.image //将图片图片box1图片复制到picturebox2这是我在FORM1中做的



请帮我这样做

解决方案

根本就没有意义。没有open PictireBox 这样的概念。目前还不清楚 Form1(Me)是什么意思,这也没有意义。还要注意 pictirebox1,.image 。它甚至无法编译。



你需要了解什么是类型,什么是类型,对象的实例。假设 Form2 Form1 是类型,而图片框是实例成员(非静态),只有一个结论可以是制作:在最基本和最基本的东西中,你对编程没有任何线索。不用担心:通过适当的努力和缓慢的有条理的方法,它可以在没有大问题的情况下学习。



这里没有什么可以解决的,除了一件事:停止思考你可以进入UI。你还没有准备好。了解基础知识,了解什么是类型,对象,成员,方法,参数等。为此,使用最简单的仅控制台应用程序进行练习即可。 :-)







另见我的文章一次回答的许多问题 - Windows窗体或WPF Windows之间的协作 [ ^ ]。



这与您的问题直接相关。但试着理解,而不仅仅是复制代码。了解什么是类型和实例。 (叹气......)



-SA


好的!我的回答:
表格2上的
:你有一个图片框,你需要设置:修改=公共

复出形式1代码:



Form2 dis = new Form2();

dis.pictureBox1.Image = pictureBox1.Image;

dis.Show();



完成!希望对你有所帮助! :)


从一个图片框复制到另一个图片框

条件: -

1.双图片框图片大小shold相同然后使用下面的代码: -



 私人  Sub  Button2_Click( ByVal  sender  As  System。 Object  ByVal  e  As  System.EventArgs)< span class =code-keyword>句柄 Button2.Click 
Form2.Show()
PictureBox1.Size = 大小( 148 38
Form2.PictureBox2.Image = .PictureBox1.Image
结束 Sub


hi,
i have already image in picturebox1 where ihave another form in same project which is picturebox2 whenever trying use this code as per my knowledge its not working need help..thank you..

Form2.picturebox2.image=Form1(Me).picturebox1,.image //copying image picture box1 image to picturebox2 this i am doing in FORM1

please help me to do this

解决方案

It makes no sense at all. There is no such concept as "open PictireBox". It's not clear what did you mean by Form1(Me), it also makes no sense. Also pay attention for pictirebox1,.image. It cannot even compile.

You need to understand what are types and what are instances of the types, objects. Assuming Form2 and Form1 are types, and picture boxes are instance members (non-static), only one conclusion can be made: you have no clue on programming, in the most elementary and basic things. Not to worry: with appropriate effort and slow methodical approach, it can be learned without big problems.

There is nothing to fix here, except one thing: stop thinking that you can get to UI. You are not ready yet. Get to the very basics, learn what are types, objects, members, methods, parameters, and so on. For this purpose, exercises with the simplest console-only application is the very it. :-)

[EDIT]

See also my article Many Questions Answered at Once — Collaboration between Windows Forms or WPF Windows[^].

It is directly related to your question. But try to understand, not just copy the code. Understand what are types and instances. (Sigh…)

—SA


okay! my answer:
on form 2: you have a picturebox and you need set: Modifies = Public
comeback form 1 code:

Form2 dis = new Form2();
dis.pictureBox1.Image = pictureBox1.Image;
dis.Show();

done! hope help for you! :)


to copy from one picture box to another picture box
condition:-
1.both picture box image size shold be same then use the below code:-

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
       Form2.Show()
       PictureBox1.Size = New Size(148, 38)
       Form2.PictureBox2.Image = Me.PictureBox1.Image
   End Sub


这篇关于如何在另一个图片框中打开一个图片框图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆