The previous picture disappears

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • UGUR
    New Member
    • Mar 2008
    • 2

    The previous picture disappears

    Hi,
    I am a VB beginner
    I have a problem with the following code which only once drops the pic at the coordinate I klicked. On my next klick the previous picture disappears. However I want the pictures permanetly stay at their coordinates as long as I go on klicking the same picture.

    Can anybody help me for the correct code?
    Thx.
    Ugur Önen

    [CODE=vbnet]
    Private Sub PictureBox1_Mou seDown(ByVal sender As Object, ByVal_
    e As System.Windows. Forms.MouseEven tArgs)Handles PictureBox1.Mou seDown

    Dim xPos As Integer
    Dim yPos As Integer
    If e.Button = MouseButtons.Le ft Then
    xPos = e.X : yPos = e.Y
    End If
    PicPad.Left = e.X + 155
    PicPad.Top = e.Y + 59
    End Sub
    [/CODE]
    Last edited by Killer42; Mar 5 '08, 03:30 AM.
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    Originally posted by UGUR
    I have a problem with the following code which only once drops the pic at the coordinate I klicked. On my next klick the previous picture disappears ...
    i think you'll have to create a new PicPad (which presumably is a picturebox) each time you make the drag&drop
    Last edited by Killer42; Mar 5 '08, 03:31 AM. Reason: Shortened quote block

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Originally posted by kadghar
      i think you'll have to create a new PicPad (which presumably is a picturebox) each time you make the drag&drop
      You might be able to simply draw a copy of the picture by using the PaintPicture method. (Well, whatever the equivalent is in your version - this is from the older VB6.)

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        Originally posted by UGUR
        On my next klick the previous picture disappears.
        Thats what your code says.

        You are changing the position on each mouse down .

        Comment

        • UGUR
          New Member
          • Mar 2008
          • 2

          #5
          Originally posted by debasisdas
          Thats what your code says.

          You are changing the position on each mouse down .
          True, I want to put the same picture at different coordinates on the same picturebox, so that I
          can obtain a group of same picture. But how?



          Thx

          Comment

          Working...