Dim image As Bitmap = New Bitmap(50, 50) Dim g As Graphics = Graphics.FromImage(image) g.Clear(Color.Transparent)
g.DrawRectangle(Pens.red, New Rectangle(10, 10, 30, 30))
image.Save("d:\123.png", System.Drawing.Imaging.ImageFormat.Png) Dim img As Image = GetImage("C:\Users\pcliujianhua\Desktop\123.PNG") ClipBoard.SetImage(img)