I have start to build my first software and i try to copy to clipboard a e.graphic draw in a panel but wen i try to copy the image are empty How can i copy my graphic to clipboard as a png image from paint event
This is my code.
Dim fileName = OpenFileDialog1.FileName
Dim image1 = Image.FromFile(fileName, True)
Dim texture As New TextureBrush(image1)
texture.WrapMode = Drawing2D.WrapMode.Tile
Dim font As New Font("Arial", 8, FontStyle.Bold)
e.Graphics.DrawString(textoutline, FontDialog1.Font, texture, TextBox2.Text, TextBox3.Text)
And i try to copy to clipboard with this code
Dim graphicsImage = New Bitmap(Panel1.Width, Panel1.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb)
Clipboard.SetImage(graphicsImage)
but i need to copy as png format how can i save it