Labels and picture names

  • Thread starter Thread starter karim
  • Start date Start date
K

karim

Hello all,
could someone help me with this. I have a form to view pictures from a
folder. I would like to have a label to view the name of the picture that I'm
viewing. Any Ideas or suggestions? thanks
 
If this is related to your question from yesterday, then just set a label in
the routine where the counter is incrimented/decrimented for your
next/previous buttons. The label would be set when the image is changed.
 
karim said:
could someone help me with this. I have a form to view pictures from a
folder. I would like to have a label to view the name of the picture that
I'm
viewing.

If you have chosen to adopt the solution I posted yesterday, just add a
label control to the form and replace the following procedure:

\\\
Private Sub ShowCurrentFile()
Me.PictureBox1.ImageLocation = m_Files(m_CurrentFile)
Me.Label1.Text = m_Files(m_CurrentFile)
End Sub
///
 
Hello all,
    could someone help me with this. I have a form to view pictures from a
folder. I would like to have a label to view the name of the picture thatI'm
viewing. Any Ideas or suggestions? thanks

Simply assign PictureBox1.ImageLocation property with your Label:

' PictureBox1 is your picturebox showing current image
Label1.Text = PictureBox1.ImageLocation.ToString

HTH,

Onur Güzel
 
kimiraikkonen said:
Label1.Text = PictureBox1.ImageLocation.ToString

Just get rid of the '.ToString', it's not necessary because 'ImageLocation'
already returns a string.
 
Just get rid of the '.ToString', it's not necessary because 'ImageLocation'
already returns a string.

Right, it's needless, it was just a habit of usage.

However, i think using ToString method is not harmful though.

Onur Güzel
 
Back
Top