4 Replies - 3165 Views - Last Post: 21 September 2012 - 06:56 AM Rate Topic: -----

#1 zaino131  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 17-September 12

button click in form 1 to display picture in form 2

Posted 17 September 2012 - 05:57 PM

In my program I'm doing a computer menu.In my assignment it asks to make a mini form appear with a pic of the item when clicked(button). it also so ask when the mini form appears theres an option button on it which lets you go back to form 1. Pl z Help Me ASAP!!!

I Use:
Radio buttons,
check boxes,
form1, form2
buttons
picturebox
Is This A Good Question/Topic? 0
  • +

Replies To: button click in form 1 to display picture in form 2

#2 leixnt  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 30
  • Joined: 24-July 11

Re: button click in form 1 to display picture in form 2

Posted 17 September 2012 - 07:33 PM

just write (i assume form 2 appear with picturebox):

form2.[picturebox name].picture = loadpicture([picture path])

for example
picture box name : picture1
picture path name : C:\picture.jpg

then u should write like this

form2.picture1.picture = loadpicture("C:\picture.jpg")

Was This Post Helpful? 0
  • +
  • -

#3 zaino131  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 17-September 12

Re: button click in form 1 to display picture in form 2

Posted 17 September 2012 - 07:37 PM

View Postleixnt, on 17 September 2012 - 07:33 PM, said:

just write (i assume form 2 appear with picturebox):

form2.[picturebox name].picture = loadpicture([picture path])

for example
picture box name : picture1
picture path name : C:\picture.jpg

then u should write like this

form2.picture1.picture = loadpicture("C:\picture.jpg")


View Postzaino131, on 17 September 2012 - 07:36 PM, said:

View Postleixnt, on 17 September 2012 - 07:33 PM, said:

just write (i assume form 2 appear with picturebox):

form2.[picturebox name].picture = loadpicture([picture path])

for example
picture box name : picture1
picture path name : C:\picture.jpg

then u should write like this

form2.picture1.picture = loadpicture("C:\picture.jpg")



ok ill try and tell you if it works.It does work without me making a series of forms right
Was This Post Helpful? 0
  • +
  • -

#4 zaino131  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 17-September 12

Re: button click in form 1 to display picture in form 2

Posted 17 September 2012 - 07:52 PM

View Postleixnt, on 17 September 2012 - 07:33 PM, said:

just write (i assume form 2 appear with picturebox):

form2.[picturebox name].picture = loadpicture([picture path])

for example
picture box name : picture1
picture path name : C:\picture.jpg

then u should write like this

form2.picture1.picture = loadpicture("C:\picture.jpg")


This Is were im placing it were my one of my radio button is:
Private Sub rad5Ghz_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles rad5Ghz.Click
        lblcpuSpeed.Enabled = False
        Me.Show()
        frm5Ghz.Show()
        frm5Ghz.pic5Ghz.picture = loadpicture("F:\Visual Studio 2008\Pics\Intel.jpg")

    End Sub


Error:
'picture' is not a member of 'System.Windows.Forms.PictureBox'
'name' 'loadpicture is not declared'

Ill send My program return out with the fix. Greatly appreciated!!(*Quick note before you replied i went through making series of form to get the task done but i dont think my teacher give me the mark if i do it that way)Attached File  CpuSpecs#2.zip (1.39MB)
Number of downloads: 51

This post has been edited by BobRodes: 21 September 2012 - 06:52 AM
Reason for edit:: Please use code tags in future.

Was This Post Helpful? 0
  • +
  • -

#5 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: button click in form 1 to display picture in form 2

Posted 21 September 2012 - 06:56 AM

The answers that you've been getting are for Visual Basic 6, because you've posted in the VB6 forum. The error you're getting is a .Net error, because the answers that you've been getting don't apply to VB.Net. (There is no LoadPicture statement in VB.Net, for example.) I've moved you to the VB.Net forum, and please make sure that you post any further VB.Net questions you might have to this forum.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1