CGSI3
Messages postés416Date d'inscriptionvendredi 22 février 2008StatutMembreDernière intervention 7 janvier 2018
-
7 mai 2011 à 22:05
cs_cheyenne
Messages postés693Date d'inscriptionsamedi 18 mai 2002StatutMembreDernière intervention17 avril 2017
-
8 mai 2011 à 18:44
Bonsoir,
Je fais une petite animation en 3D sur un PictureBox.
Le calcul d'image est parfois long et saccadé et je voudrais pouvoir prendre des "photos" du PictureBox de manière régulière.
Cela marche avec un tabcontrol, mais pas avec un PictureBox actualisé toute les 40 ms
Dim Seconde_Memory as Integer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
'Sauvegarde toute les 10 secondes
Dim p As Integer = TimeOfDay.Second / 10
If p <> Seconde_Memory Then
Seconde_Memory = p
Dim Nom As Object = Format(Today, "ddmmyy") & Format(TimeOfDay, "hhmmss")
Dim PathFile As String = "C:\Nouveau dossier" & Nom.ToString & ".jpg"
Dim B As Bitmap = GetFormImage(TabControl1)
B.Save(PathFile, System.Drawing.Imaging.ImageFormat.Jpeg)
End If
End Sub
Public Function GetFormImage(ByVal Objet As TabControl) As Bitmap
Dim bmp As New Bitmap(Objet.Bounds.Width, Objet.Bounds.Height)
Objet.DrawToBitmap(bmp, Objet.Bounds)
Objet.Refresh()
Return bmp
End Function
Est-il possible ensuite de former une petite vidéo a partir des images sauvegardé.
d'avance merci. CGSI3
CGSI3
Messages postés416Date d'inscriptionvendredi 22 février 2008StatutMembreDernière intervention 7 janvier 20181 8 mai 2011 à 17:39
Bonjour,
Pour les noms de fichiers et la réponse a ma dernière question. ==> Grand Merci Cheyenne !
Pour ma première partie, je n'ai pas encore réussi a faire la même chose avec un PictureBox,
Cependant j'ai une solution de secours avec l'utilisation de ce logiciel qui permet de ne saisir qu'une partie de mon écran:
Free Screen To Video