Labels and picture names

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?a2FyaW0=?=

    Labels and picture names

    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
  • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

    #2
    RE: Labels and picture names

    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" wrote:
    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

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Labels and picture names

      "karim" <karim@discussi ons.microsoft.c omschrieb:
      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_Curre ntFile)
      Me.Label1.Text = m_Files(m_Curre ntFile)
      End Sub
      ///

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

      Comment

      • kimiraikkonen

        #4
        Re: Labels and picture names

        On Oct 14, 1:21 pm, karim <ka...@discussi ons.microsoft.c omwrote:
        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.Ima geLocation property with your Label:

        ' PictureBox1 is your picturebox showing current image
        Label1.Text = PictureBox1.Ima geLocation.ToSt ring

        HTH,

        Onur Güzel

        Comment

        • Herfried K. Wagner [MVP]

          #5
          Re: Labels and picture names

          "kimiraikko nen" <kimiraikkonen8 5@gmail.comschr ieb:
          >Label1.Text = PictureBox1.Ima geLocation.ToSt ring
          Just get rid of the '.ToString', it's not necessary because 'ImageLocation'
          already returns a string.

          --
          M S Herfried K. Wagner
          M V P <URL:http://dotnet.mvps.org/>
          V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

          Comment

          • kimiraikkonen

            #6
            Re: Labels and picture names

            On Oct 14, 7:05 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
            h...@gmx.atwrot e:
            "kimiraikko nen" <kimiraikkone.. .@gmail.comschr ieb:
            >
            Label1.Text = PictureBox1.Ima geLocation.ToSt ring
            >
            Just get rid of the '.ToString', it's not necessary because 'ImageLocation'
            already returns a string.
            >
            --
             M S   Herfried K. Wagner
            M V P  <URL:http://dotnet.mvps.org/>
             V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
            Right, it's needless, it was just a habit of usage.

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

            Onur Güzel

            Comment

            Working...