Salut je développe un app de dessin pour Loozer-OS.
Mais je ne sais pas comment enregistre l'image créer.
Merci d'avance pour votre aide
Mais je ne sais pas comment enregistre l'image créer.
- Code:
Imports System.IO
Public Class Loozer_app_brush
Dim down = False
Dim myBrush As System.Drawing.SolidBrush = New System.Drawing.SolidBrush(Color.Black)
Dim taille As Integer = 15
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
down = True
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If down = True Then
PictureBox1.CreateGraphics.FillEllipse(myBrush, e.X, e.Y, taille, taille)
End If
End Sub
Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
down = False
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs)
If ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
myBrush.Color = ColorDialog1.Color
End If
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
myBrush.Color = Color.White
End Sub
Private Sub Label12_Click(sender As Object, e As EventArgs) Handles Label12.Click
Me.Close()
End Sub
Private Sub NumericUpDown1_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown1.ValueChanged
taille = Int(NumericUpDown1.Value)
End Sub
Dim NewPoint As New System.Drawing.Point
Dim X, Y As Integer
Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
X = Control.MousePosition.X - Me.Location.X
Y = Control.MousePosition.Y - Me.Location.Y
End Sub
Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
If e.Button = MouseButtons.Left Then
NewPoint = Control.MousePosition
NewPoint.Y -= (Y)
NewPoint.X -= (X)
Me.Location = NewPoint
End If
End Sub
Private Sub Loozer_app_brush_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Private Sub KryptonColorButton1_SelectedColorChanged(sender As Object, e As ComponentFactory.Krypton.Toolkit.ColorEventArgs) Handles KryptonColorButton1.SelectedColorChanged
myBrush.Color = KryptonColorButton1.SelectedColor
End Sub
End Class
Merci d'avance pour votre aide
Dernière édition par TheMonax le Jeu 8 Mai - 18:09, édité 1 fois