3 Replies - 1123 Views - Last Post: 01 August 2012 - 02:51 PM Rate Topic: -----

#1 AceKYD  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 32
  • Joined: 01-July 12

How can i merge controls as an image in Vb

Posted 31 July 2012 - 06:58 AM

hello, I am new to Visual basic programming. I have been trying to merge the following items : 5 labelboxes, and 2 pictureboxes and a background image into one single control that can allow me to save the control as an image. I have tried the Groupbox that allows this merging but it does not support the Image function. A button supports the image function but i can't merge this items together in the button. I am looking for any control that supports this functions above or any hint as at how to go about it. thank you

Is This A Good Question/Topic? 0
  • +

Replies To: How can i merge controls as an image in Vb

#2 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 545
  • View blog
  • Posts: 2,904
  • Joined: 19-May 09

Re: How can i merge controls as an image in Vb

Posted 31 July 2012 - 07:14 AM

I'm unaware of any control that has the intrinsic ability to save itself as an image, probably because I've also never heard of a reason to do it. The command button's image property is to allow you to have an image on a command button instead of a line of text. If you do find an Image property on a control, it does not have to do with the idea that you are expressing. So, let's take a step backwards. Why do you need to do what you are trying to do? Perhaps there's another way to get it done.

This post has been edited by BobRodes: 31 July 2012 - 07:15 AM

Was This Post Helpful? 0
  • +
  • -

#3 AceKYD  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 32
  • Joined: 01-July 12

Re: How can i merge controls as an image in Vb

Posted 31 July 2012 - 07:38 AM

Thank you for the quick reponse, what i am trying to do is get details from using textboxes from the user and then make the labelboxes in the new form to attribute to its respective textboxes. the user will be allowed to upload a picture using the open file dialog. Then at the end of the application, the user will be able to save the uploaded picture that is already merged with his details as a picture using the savefiledialog. I have tried using a button control, but only the picture is saved. here is my code for the savefiledialog..
My button1 launches the savefiledialog
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        SaveFileDialog1.Filter = "Jpeg (*.jpg)|*.jpg"
        SaveFileDialog1.Title = "Save an Image"
        SaveFileDialog1.ShowDialog()
        If SaveFileDialog1.FileName <> "" Then
            Dim Fs As System.IO.FileStream = CType _
            (SaveFileDialog1.OpenFile(), System.IO.FileStream)
            Select Case SaveFileDialog1.FilterIndex
                Case 1
                    Me.Button2.Image.Save(Fs, System.Drawing.Imaging.ImageFormat.Jpeg)
            End Select
        End If
    End Sub

Was This Post Helpful? 0
  • +
  • -

#4 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 545
  • View blog
  • Posts: 2,904
  • Joined: 19-May 09

Re: How can i merge controls as an image in Vb

Posted 01 August 2012 - 02:51 PM

I've never seen your application, so you need to clarify a lot of things in your explanation. Let's ignore your code for now; no sense telling you how to do something when I don't know what you want to do.

1. What are "details"?
2. What does "from using textboxes" mean?
3. Explain what "the labelboxes on the new form" are.
4. What do you mean by "respective text boxes"?
5. The user can only upload one picture, you are saying. What does the picture relate to in your application?
6. How is your picture "already merged" with your "details"? How does that work?
7. Explain where you "save" the picture.
8. Do you save the details as well?

This post has been edited by BobRodes: 01 August 2012 - 02:53 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1