problem with picture box

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jhonatas M. Rodríguez

    problem with picture box

    Hello Everybody

    how are you everybody ?... i have a problem with picture box, i want copy a image from the clipboard, and me can to copy a image if the image is a bitmap(extensio n bmp), but if the image is the other type(example, jpg, jpeg, gif, etc) i don't can, i have a error. i'm new in VB.NET, i'm a student and want to learn VB.NET, please an example or suggestions. thanks for your time and help

    Att.
    Jhonatas M. Rodrígue

  • Herfried K. Wagner [MVP]

    #2
    Re: problem with picture box

    * "=?Utf-8?B?SmhvbmF0YXM gTS4gUm9kcsOtZ3 Vleg==?=" <jhonatas_rod@y ahoo.com> scripsit:
    [...]

    Please tell your newsreader application to break lines after 76
    characters, your message was "unreadable ".

    --
    Herfried K. Wagner [MVP]
    <http://www.mvps.org/dotnet>

    Comment

    • james

      #3
      Re: problem with picture box

      Jhonatas,
      Here is a link to a webpage that has a good example on how to do this
      correctly. It sounds to me like you just have not set the filter correctly
      for the image type you are trying to copy to the clipboard.
      james

      Visual Studio dev tools & services make app development easy for any developer, on any platform & language. Develop with our code editor or IDE anywhere for free.




      "Jhonatas M. Rodríguez" <jhonatas_rod@y ahoo.com> wrote in message
      news:9AC2FA4F-32B4-4D45-89B5-B6A38281D1C9@mi crosoft.com...[color=blue]
      > Hello Everybody:
      >
      >
      > how are you everybody ?... i have a problem with picture box, i want[/color]
      copy a image from the clipboard, and me can to copy a image if the image is
      a bitmap(extensio n bmp), but if the image is the other type(example, jpg,
      jpeg, gif, etc) i don't can, i have a error. i'm new in VB.NET, i'm a
      student and want to learn VB.NET, please an example or suggestions. thanks
      for your time and help.[color=blue]
      >
      > Att.
      >[/color]
      Jhonatas M. Rodríguez[color=blue]
      >[/color]


      Comment

      • Ken Tucker [MVP]

        #4
        Re: problem with picture box

        Hi,

        Try this.
        Copy image to clipboard
        Clipboard.SetDa taObject(Image. FromFile("C:\te st.jpg"))



        Retrieve from clipboard

        If iData.GetDataPr esent(DataForma ts.Dib) Then

        Dim bm As Bitmap = iData.GetData(D ataFormats.Bitm ap)

        PictureBox1.Ima ge = bm

        End If

        Ken
        ----------------
        "Jhonatas M. Rodríguez" <jhonatas_rod@y ahoo.com> wrote in message
        news:9AC2FA4F-32B4-4D45-89B5-B6A38281D1C9@mi crosoft.com...[color=blue]
        > Hello Everybody:
        >
        >
        > how are you everybody ?... i have a problem with picture box, i want
        > copy a image from the clipboard, and me can to copy a image if the image
        > is a bitmap(extensio n bmp), but if the image is the other type(example,
        > jpg, jpeg, gif, etc) i don't can, i have a error. i'm new in VB.NET, i'm
        > a student and want to learn VB.NET, please an example or suggestions.
        > thanks for your time and help.
        >
        > Att.
        >
        > Jhonatas M. Rodríguez
        >[/color]


        Comment

        • Jhonatas M. Rodríguez

          #5
          Wagner, here the message again

          Hello Everybody
          Hey Herfried K. Wagner, here the message again

          how are you everybody ?... i have a problem with picture box,
          i want copy a image from the clipboard, and me can to copy a
          image if the image is a bitmap(extensio n bmp), but if the image
          is the other type(example, jpg, jpeg, gif, etc) i don't can, i have
          a error. i'm new in VB.NET, i'm a student and want to learn VB.NET,
          please an example or suggestions. thanks for your time and help

          Att
          Jhonatas M. Rodríguez

          Comment

          Working...