Results 1 to 8 of 8

Thread: Saving image

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    145

    Saving image

    I need to do the following:
    1) Load picture (.jpg) in PictureBox/Image.
    2) Load textbox on the picture and allow the user drag and drop the textbox into the picture and typing text into the textbox.
    3) Saving the picture with this textbox as new file (.jpg)

    Any ideas how to implement that?

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    To load an image :

    VB Code:
    1. PictureBoxName.Picture = LoadPicture(FileName)


    Has someone helped you? Then you can Rate their helpful post.

  3. #3
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    For textbox drag :

    VB Code:
    1. Option Explicit
    2.  
    3. Dim XX As Integer
    4. Dim YY As Integer
    5.  
    6. Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    7.     XX = X
    8.     YY = Y
    9. End Sub
    10.  
    11. Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    12.     If Button = vbLeftButton Then
    13.         Text1.MousePointer = vbSizeAll
    14.         Text1.Left = Text1.Left + X - XX
    15.         Text1.Top = Text1.Top + Y - YY
    16.     End If
    17. End Sub
    18.  
    19. Private Sub Text1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    20.     Text1.MousePointer = vbDefault
    21. End Sub


    Has someone helped you? Then you can Rate their helpful post.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    145
    OK. It's easy, what about 'Saving the picture with this textbox as new file (.jpg)' ???

  5. #5
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Well, one (stupid) option is you can take a screenshot of the pic box with the textbox on it and save that...


    Has someone helped you? Then you can Rate their helpful post.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    145
    Originally posted by manavo11
    Well, one (stupid) option is you can take a screenshot of the pic box with the textbox on it and save that...

    Could you show me how to take a screenshot of the pic box with the textbox on it and save that?

  7. #7
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    I'll post it when I get home later...


    Has someone helped you? Then you can Rate their helpful post.

  8. #8
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Have a look at this
    Attached Files Attached Files


    Has someone helped you? Then you can Rate their helpful post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width