does anyone here know how to save a visual basic form in any file format such a jpeg??? im currently working on a program wherein i can view an image + i can add labels and save it in jpeg format. pls help. urgently needed... tnx in advance...
1. CreateCompatibleDC to create a DC compatible with your window's DC
2. CreateCompatibleBitmap with the appropriate dimensions
3. SelectObject to select the window into the bitmap
4. BitBlt the window into the bitmap
5. Save the bitmap as Jpeg
I'll assume that what is required is the ability to load a picture into the form, put labels on it, and save it again. To do so one would load the picture into the form (or picturebox) use the Print Method along with the currentX or CurrentY properties, and then do a SavePicture() back to a Jpeg.
Fascinating question. Assume you have good reason for it. Either you're wanting to display a form and it's specific content as a picture such as in a help display or a tutorial which is ultra easy and outlined above or you want to save a form in Jpeg format as you stated, which, simply put is a yes, but pointless since the form will not be reusable. The other possibility is super sophisticated and implies you want to smuggle forms out in Jpeg files where the form content is not displayed but hidden in the unused portions of the Jpeg file. That is called steganography and there are multiple sources available for that technology.
So which door is it, 1, 2 or 3?
Dim dlg as New SaveFileDialogue
dlg.Tittle = "Save"
dlg.FileName = ""
dlg.Filter = "All Files (*.*)|*.*|PNG Files (*.png)|*.png|Jpeg Files (*.jpg)|*.jpg"
If dlg.ShowDialogue = DialogueResult.OK Then
If dlg.ShowDialog = DialogResult.OK Then
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...