|
-
Aug 27th, 2006, 03:21 PM
#1
Thread Starter
Addicted Member
-
Aug 27th, 2006, 03:34 PM
#2
Frenzied Member
Re: [2005] loading a picture into a picture box..
VB Code:
if radiobutton1.Checked = True then
picturebox1.Load(application.StarupPath & "\image1.jpg")
elseif radiobutton2.checked = true then
picturebox2.load(application.StarupPath & "\image2.jpg")
end if
-
Aug 27th, 2006, 03:53 PM
#3
Thread Starter
Addicted Member
Re: [2005] loading a picture into a picture box..
I put this code in the radio button and it says-
"load is not a member of windows forms application , what does it mean?
and another thing that doesn't fit is-
I want to use only one picturebox ,and with choose of one radio button it will load the picture in the same picturebox for both radio buttons...
Last edited by noam309; Aug 27th, 2006 at 04:05 PM.

Giving an exact answer
Saves a lot of time!!!
-
Aug 27th, 2006, 04:13 PM
#4
Frenzied Member
Re: [2005] loading a picture into a picture box..
I don't have the ide in front of me, so use visual studios intelisense. It's either load, or loadfile. Instead of just copying and pasting the code, look at it and see what it does. This should be easy enough for you to convert into what you want.
 Originally Posted by noam
Giving an exact answer Saves a lot of time!!!"
But you don't learn anything because you copy and paste the code and don't look at what it does.
-
Aug 27th, 2006, 04:26 PM
#5
Re: [2005] loading a picture into a picture box..
try this
VB Code:
If Me.radiobutton1.Checked = True Then
Me.PictureBox1.Image = New Bitmap(My.Application.Info.DirectoryPath & "\image1.jpg")
ElseIf Me.radiobutton2.checked = True Then
Me.PictureBox1.Image = New Bitmap(My.Application.Info.DirectoryPath & "\image2.jpg")
End If
-
Aug 27th, 2006, 11:19 PM
#6
Thread Starter
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|