Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'https://www.youtube.com/watch?v=4SbhYg_iwKk
- Public Class Form1
- Dim Graph As Graphics
- Dim Drawbitmap As Bitmap
- Dim Brush As New Drawing.SolidBrush(Color.Black)
- RichTextBox1_TextChanged:
- Drawbitmap = New Bitmap(PictureBox1.Width, PictureBox1.Height)
- Graph = Graphics.FromImage(Drawbitmap)
- PictureBox1.Image = Drawbitmap
- Graph.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
- Graph.DrawString(RichTextBox1.Text, RichTextBox1.Font, Brush, PictureBox1.Location)
- Font:
- Dim dlg As New FontDialog
- If dlg.ShowDialog = Windows.Forms.DialogResult.OK Then
- RichTextBox1.Font = dlg.Font
- End If
- Colour:
- Dim dlg As New ColorDialog
- If dlg.ShowDialog = Windows.Forms.DialogResult.OK Then
- Brush.Color = dlg.Color
- RichTextBox1.ForeColor = dlg.Color
- End If
- You can add save code, if ya want the codes for save, here it is:
- Dim dlg As New SaveFileDialog
- dlg.Filter = "Bitmap|*.bmp"
- If dlg.ShowDialog = Windows.Forms.DialogResult.OK Then
- PictureBox1.Image.Save(dlg.FileName)
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement