Questions tagged [drawtobitmap]

31 questions
1
vote
0 answers

Saving a forms client area to image file without decorations (title bar, border)

I would like to save the client area of a form into an image file without the decorations (title bar and borders). I have played some with the ClientRectangle and Bounds Properties but I have no success. The saved image file always has the title bar…
1
vote
0 answers

C# WebBrowser DrawToBitmap returning a white picture on DOM change

I have been attempting to capture a webpage for automation purposes however I have been having issues where DrawToBitmap() returns a white picture. It seems to me that it returns white when the DOM has been changed or the browser navigates. For…
FraserK
  • 304
  • 1
  • 3
  • 17
1
vote
0 answers

DrawToBitmap - A generic error occurred in GDI+

I'm trying to capture a screenshot from a flash object in my windows forms form. When I try to do this and debug, I get the exception A generic error occurred in GDI+. on the bmp.Save... line. However what seems to be responsible is DrawToBitmap.…
user1071461
0
votes
2 answers

Why am I missing controls with bit

Simple problem. I have a form to which I add a panel and put 1 label with some text. When I look at the saved image, all I see is the panel. I have tried all the solutions I could find. Code below. I get the panel saved but the text box doesn't…
GrandpaG
  • 11
  • 1
  • 3
0
votes
1 answer

Save Drawn Images PictureBox

My program allows the user to draw in a PictureBox. I'm trying to save the pictureBox1 as a .jpg file but this file is empty. My save button: Bitmap bm = new Bitmap(pictureBox1.ClientSize.Width,…
Ohy
  • 3
  • 2
0
votes
0 answers

drawbitmap from painting on a win form

i have a Windows-Form, i need to draw some lines and rectangles to show a shape on the form. i want to capture this shown paintings to store them in Database the method i use for capture is : internal void CapturePartition() { Bitmap…
user9022663
0
votes
1 answer

ZedGraph to PDF using MigraDoc

I am currently working on a C# application that aims to do some computation and output graphs in a pdf file. I use the Zedgraph library to draw my graphs so something like graphPane.AddCurve(PointPairList). Now I tried to output these graphs to pdf…
bchu1392
  • 59
  • 2
  • 8
0
votes
0 answers

Control.DrawToBitmap gives error code 253

My app use winform with gecko webbrowser, when i try to drawtobitmap, it gives error code 253,and no any other error, even i already "try catch". Note: i use vs 2015 community here is my code: private void button1_Click(object sender, EventArgs e) …
mysticcode
  • 345
  • 1
  • 2
  • 18
0
votes
2 answers

WebBrowser.DrawToBitmap() doesn't render the image

I have got into a strange situation and couldn't find a reason or resolution to it. I have a utility that creates a jpg image out of an HTML content. It is using WebBrowser.Navigate(url) and WebBrowser.DrawToBitmap() methods. This utility has been…
0
votes
3 answers

DrawToBitmap returns black Image from UserControl

My first post here so here goes, i have a UserControl with about 30 controls (labels, textboxes etc). Now i would like to make a "screenshot" of it. So i used the "DrawToBitmap" method from the UserControl. Here some samplecode //this is the…
Domi Light
  • 11
  • 4
0
votes
0 answers

DrawToBitmap: Temporarily scale a control

I am using DrawToBitmap to generate a snapshop of a WinForms control and I give the user the option to generate this image in different sizes. My code for resizing the control is Private Function GetChartScaledImage(NewSize As Size) As Bitmap …
Jens
  • 6,275
  • 2
  • 25
  • 51
0
votes
2 answers

Save panel as image in asp.net

I have a panel in asp.net that contains many images. My problem is how to save the all image in the panel as 1 image. Is it possible to use drawToBitmap in asp.net?
MMakati
  • 693
  • 1
  • 15
  • 33
0
votes
1 answer

DrawtoBitmap not showing contents of Panel

My first post here so here goes, i have a program that i need to get the color of a pixel in a panel, the panel contains a IE browser as shown in the code below (I cant use a webBrowser as it doesn't load some webpages the same as IE/Firefox…
Ryan
  • 39
  • 5
0
votes
1 answer

panel1.DrawToBitmap doesn't draw lines from DrawLine

I have a panel on which I'm drawing lines using: Point PreviousPoint = new Point (0,0); Point NewPoint = new Point (10,10); Pen MyPen = new Pen(Color.Black, 2); Graphics MyGraphics = panel1.CreateGraphics(); MyGraphics.DrawLine(MyPen, PreviousPoint,…
Chris
  • 2,619
  • 6
  • 27
  • 34
0
votes
1 answer

taking screenshot of a 'zoom' ed image which is not shown completely on screen

in my winform application i am trying to take screenshot of a image, and assign it to picturebox using DarwToBitmap() method. it works fine for me, but when i zoom the image and then take screen shot, in picturebox only part of image that was…
Iorn Man
  • 267
  • 8
  • 21