Private Sub SaveImage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveImage.Click
Dim sfd As New SaveFileDialog
sfd.Filter = "JPG files (*.jpg)|*.jpg"
sfd.ShowDialog()
If sfd.FileName <> "" Then
Dim a As Graphics = Graphics.FromImage(Me.BackgroundImage)
a.DrawString(GearTeeths.Text, New Font(New FontFamily("Tahoma"), 8), Brushes.Black, 12, 342)
a.DrawString(PinionTeeths.Text, New Font(New FontFamily("Tahoma"), 8), Brushes.Black, 12, 360)
a.DrawString(DC.Text, New Font(New FontFamily("Tahoma"), 8), Brushes.Black, 12, 378)
a.DrawString(GearAngle.Text, New Font(New FontFamily("Tahoma"), 8), Brushes.Black, 113, 342)
a.DrawString(PinionAngle.Text, New Font(New FontFamily("Tahoma"), 8), Brushes.Black, 113, 360)
a.DrawString(Label1.Text, New Font(New FontFamily("Tahoma"), 8), Brushes.Red, 558, 360)
a.DrawString(Label2.Text, New Font(New FontFamily("Tahoma"), 8), Brushes.Blue, 553, 378)
Me.BackgroundImage.Save(sfd.FileName)
MsgBox("Image saved successfully.", MsgBoxStyle.Information)
End If
End Sub
End Class