System.Drawing.Graphics in System.Drawing.image 05/10/2013 - .NET Languages - 4 Replies hi,
Titel regelt, hier ist noch der Codeausschnitt:
Dim Bmap = New Bitmap(Me.Width, Me.Height)
Dim gra As Graphics = Graphics.FromImage(Bmap)
gra.CopyFromScreen(WebBrowser1.Location.X, WebBrowser1.Location.Y, 0, 0, WebBrowser1.Size)
gra.Dispose()
PictureBox1.Image = gra
Error:
Der Wert vom Typ "System.Drawing.Graphics" kann nicht in "System.Drawing.Image" konvertiert werden.
System.Drawing 07/08/2010 - CO2 Programming - 9 Replies Not strong in this :L
Not good with Forms, Events and system.Drawing
Im making a key event draw a new Rectangle when the key is (Down) is pressed, but its not drawing a new rectangle when i press down continuously:
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
Graphics GE = Graphics.FromHwnd(this.Handle);
Pen PE = new Pen(Color.Black);
Rectangle NE = new Rectangle(15, 15, 20, 50);