2 Replies - 1102 Views - Last Post: 13 August 2015 - 07:25 AM Rate Topic: -----

#1 digituser   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 73
  • Joined: 09-August 15

passing the image from one form to another

Posted 13 August 2015 - 05:09 AM

How to pass the image form one form to another form?. Actually the list box have 10 images in the form1,and the preview button also.
if i click the preview button ,the image displaying in form2.How to pass the image ?
Is This A Good Question/Topic? 0
  • +

Replies To: passing the image from one form to another

#2 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6535
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: passing the image from one form to another

Posted 13 August 2015 - 05:32 AM

Form? Well in the 1990's we'd do that as described in FAQ #3 below.
But in *THIS* century we make WPF applications, with your objects (images in this case) in the view model.



tlhIn`toq's FAQ list

Learning to debug one's own code is an essential skill. Sadly, one that apparently few college courses teach. Silly if you ask me.
Placing breakpoints and walking through the code line by line allows you to actually WATCH it execute, check the condition of each of variable's run-time value, and watch the logic unfold right before your eyes.
Visualizing what your code does will let you see why it behaves the way it does.
It would be well worth your time to do the tutorials on FAQ 2. A couple hours learning this skill will save you hundreds of hours of confusion in one project alone.

In addition to FAQ 2 in the list below, also check my signature block for a link on how to look at your variables' values at run-time.

TOP most asked:
What does this error message mean?
FAQ 2: How do I debug
FAQ 3: How do I make Class1/Form1 talk to Class2/Form2


FAQ (Frequently Asked Questions - Updated July 2013
Spoiler



This post has been edited by tlhIn`toq: 13 August 2015 - 05:33 AM

Was This Post Helpful? 0
  • +
  • -

#3 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14552
  • View blog
  • Posts: 58,359
  • Joined: 12-June 08

Re: passing the image from one form to another

Posted 13 August 2015 - 07:25 AM

Images are all part of the bitmap class, right? Create an object instance of your image and pass it like any other variable to another form.

https://msdn.microso...=vs.110%29.aspx
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1