Short answer: do not use WebBrowser.DrawToBitmap as a screenshot solution. Microsoft’s control-specific documentation states that WebBrowserBase.DrawToBitmap is unsupported by the Windows Forms WebBrowser control, so a blank bitmap is an expected failure mode rather than a missing parameter. You can capture the pixels of a visible browser area with a desktop screen-capture technique, but that requires an onscreen, unobscured control and does not produce a reliable full-page image. For new WinForms projects, Microsoft recommends WebView2 instead of this legacy ActiveX-backed control.
Why DrawToBitmap returns a blank image
The Windows Forms WebBrowser control inherits rendering members through WebBrowserBase, but the specific Microsoft Learn documentation for WebBrowserBase.DrawToBitmap says: “This method is not supported by this control.” The general Control.DrawToBitmap documentation does not override that control-specific limitation.
Changing the bitmap format, rectangle, control size, or call timing cannot turn an unsupported override into a supported screenshot API. Treat a blank or incomplete bitmap as a compatibility limitation, not as proof that your URL, image format, or save operation is wrong.
First decide what “screenshot” means
| Requirement | What it entails with WebBrowser | Important limitation |
|---|---|---|
| Visible viewport | Capture the pixels currently displayed by an onscreen control. | The window must be visible and not covered; this is a screen capture, not an offscreen rendering API. |
| Entire page | Include content below the viewport and lazy-loaded regions. | The cited WebBrowser documentation does not establish a universally supported full-page capture implementation. |
| Rendering independent of the desktop | Render in a hidden, minimized, service, or headless process. | DrawToBitmap is unsupported, and the legacy control depends on the installed browser environment. |
Make this decision before writing capture code. A viewport image can be obtained by copying screen pixels, while a full-page or offscreen requirement generally calls for a different browser technology or a screenshot service.
Recommended Free Tools
#1 Best Overall
- Compatible with Nintendo Switch 2’s new GameChat mode
- Auto-Light Balance: RightLight boosts brightness by up to 50%, reducing shadows so you look your best—compared to previous-generation Logitech webcams (1)
- Privacy with a Slide: The integrated webcam cover makes it easy to get total, reliable privacy when you're not on a video call
- Built-In Mic: The built-in microphone lets others hear you clearly during video calls
- Easy Plug-And-Play: The Brio 101 works with most video calling platforms, including Microsoft Teams, Zoom and Google Meet—no hassle; it just works
A practical visible-viewport capture in WinForms
The following C# example deliberately does not call DrawToBitmap. It waits for the documented navigation completion event, then copies the rectangle occupied by the visible control from the Windows desktop. This is useful for an interactive diagnostic tool or a test harness. It is not a promise that WebBrowser can render offscreen, and it cannot capture pixels hidden behind another window.
Complete C# example
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Windows.Forms;
internal static class Program
{
[STAThread]
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new CaptureForm());
}
}
public sealed class CaptureForm : Form
{
private readonly WebBrowser browser = new WebBrowser();
private bool captured;
public CaptureForm()
{
Text = "WebBrowser viewport capture";
Width = 1280;
Height = 900;
browser.Dock = DockStyle.Fill;
browser.ScriptErrorsSuppressed = true;
browser.DocumentCompleted += Browser_DocumentCompleted;
Controls.Add(browser);
Shown += (_, __) => browser.Navigate("https://example.com");
}
private void Browser_DocumentCompleted(object? sender,
WebBrowserDocumentCompletedEventArgs e)
{
if (captured || browser.ReadyState != WebBrowserReadyState.Complete)
return;
// Let layout and painting reach the desktop before copying pixels.
BeginInvoke(new Action(CaptureVisibleViewport));
}
private void CaptureVisibleViewport()
{
if (browser.ClientSize.Width <= 0 || browser.ClientSize.Height <= 0)
return;
Point topLeft = browser.PointToScreen(Point.Empty);
Size size = browser.ClientSize;
string file = Path.Combine(
AppDomain.CurrentDomain.BaseDirectory, "webbrowser-viewport.png");
using var bitmap = new Bitmap(size.Width, size.Height,
PixelFormat.Format32bppPArgb);
using (Graphics graphics = Graphics.FromImage(bitmap))
{
graphics.CopyFromScreen(topLeft, Point.Empty, size);
}
bitmap.Save(file, ImageFormat.Png);
captured = true;
Text = $"Saved {file}";
}
}
Run this in a normal interactive Windows session. Keep the form restored, leave the browser area unobstructed, and account for display scaling when comparing pixel dimensions. The output is the current viewport only. A cookie dialog, chat widget, animation, or delayed script that is visible at capture time will appear in the file.
Why DocumentCompleted is necessary but not sufficient
The WebBrowser control overview documents DocumentCompleted as the event that indicates a page has finished loading. It is a useful lifecycle signal, so the example waits for it and then yields once to allow painting. The documentation does not say that this event waits for every delayed script, animation, advertisement, image, or application-specific network request. If your page changes after the event, define and implement your own readiness condition rather than assuming the first event is the final visual state.
Rank #2
- Compatible with Nintendo Switch 2’s new GameChat mode
- Crisp HD 720p/30 fps video calls with diagonal 55° field of view and auto light correction. Compatible with popular platforms including Skype and Zoom.
- The built-in noise-reducing mic makes sure your voice comes across clearly up to 1.5 meters away, even if you’re in busy surroundings.
- C270’s RightLight 2 feature adjusts to lighting conditions, producing brighter, contrasted images to help you look good in all your conference calls.
- The adjustable universal clip lets you attach the camera securely to your screen or laptop, or fold the clip and set the webcam on a shelf. You’re always ready for your next video call.
What this example cannot do
- It cannot capture a minimized, hidden, or covered control reliably.
- It does not scroll and stitch a complete document.
- It does not provide deterministic output for pages whose content changes after navigation.
- It does not remove consent banners, newsletter prompts, advertisements, trackers, or chat controls.
Threading, lifetime, and runtime requirements
Use an STA UI thread
The control must run on a single-threaded apartment. Keep the [STAThread] entry point and create, navigate, capture, and dispose the control on that UI thread. Do not move a live WebBrowser instance to a worker thread after construction.
Dispose on the same UI thread
Microsoft’s WebBrowser class documentation notes that the control is resource-intensive and should be disposed on the same UI thread that attached its events. Unsubscribe handlers and dispose the form or control during normal UI shutdown; do not terminate the process to avoid cleanup.
Account for the installed browser engine
WebBrowser is a managed wrapper around the ActiveX WebBrowser control and uses whichever version is installed on the user’s computer. Two machines can therefore produce different layout, script, security, and rendering results. Your screenshot code may be identical while the pixels differ because the runtime browser is different.
Rank #3
- 【Full HD 1080P Webcam】Powered by a 1080p FHD two-MP CMOS, the NexiGo N60 Webcam produces exceptionally sharp and clear videos at resolutions up to 1920 x 1080 with 30fps. The 3.6mm glass lens provides a crisp image at fixed distances and is optimized between 19.6 inches to 13 feet, making it ideal for almost any indoor use.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 8, 10 & 11 / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
- 【Built-in Noise-Cancelling Microphone】The built-in noise-canceling microphone reduces ambient noise to enhance the sound quality of your video. Great for Zoom / Facetime / Video Calling / OBS / Twitch / Facebook / YouTube / Conferencing / Gaming / Streaming / Recording / Online School.
- 【USB Webcam with Privacy Protection Cover】The privacy cover blocks the lens when the webcam is not in use. It's perfect to help provide security and peace of mind to anyone, from individuals to large companies. 【Note:】Please contact our support for firmware update if you have noticed any audio delays.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 10 & 11, Pro / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
Security implications of loading external pages
The WebBrowser security guidance says the control is designed for full-trust applications and does not prevent unmanaged code in external content from running. Loading an untrusted URL is therefore a security decision, not merely a rendering operation. Restrict navigation to trusted origins where possible, avoid treating page content as trusted application data, and keep the capture process separated from sensitive desktop applications.
When WebView2 is the better starting point
For a new Windows Forms application, Microsoft recommends the Microsoft Edge WebView2 control rather than the legacy WebBrowser control. WebView2 uses a current Edge-based runtime model instead of the machine’s legacy ActiveX browser. However, the references cited here do not establish a universal WebView2 screenshot API, deployment recipe, or full-page implementation. Verify the capture method, runtime installation requirements, and licensing or distribution details for your target application before migrating.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →| Decision axis | Legacy WebBrowser | WebView2 or an external service |
|---|---|---|
| Existing application compatibility | Best when the project already depends on the ActiveX-backed control. | Requires migration and validation. |
| Browser consistency | Depends on the browser version installed on each computer. | WebView2 has a separately managed runtime; a service centralizes rendering outside the desktop. |
| Viewport capture | Possible as visible screen-pixel copying with the constraints shown above. | Use the product’s documented capture path and test it against your requirements. |
| Full-page capture | No universally supported implementation is established by the cited documentation. | Choose a documented full-page-capable solution and validate lazy loading and dynamic content. |
Troubleshooting
The bitmap is completely blank
Check that you are not calling DrawToBitmap; Microsoft marks it unsupported for this control. If you use the screen-copy example, make sure the form is visible, restored, and not covered, and that capture runs after DocumentCompleted and a paint turn.
Rank #4
- 1080P Webcam with Cover for Video Calls - EMEET computer webcam provides design and Optimization for professional video streaming. Realistic 1920 x 1080p video, 5-layer anti-glare lens, providing smooth video. C960 computer camera delivers 1920x1080 video with fixed focus (11.8–118.1 inches), so as to provide a clearer image. C960 USB webcam has a cover and can be removed automatically to meet your needs for privacy. For optimal image performance, use the webcam in a well-lit environment.
- Built-in 2 Omnidirectional Mics - EMEET webcam with microphone for desktop features 2 built-in omnidirectional microphones, picking up your voice to create clear audio for communication. When installing the webcam, select EMEET C960 as the default microphone input device in your computer and video applications and select C960 as the default device in Zoom/Teams and ensure microphone permissions are enabled for proper use. Please note that C960 does not include built-in speakers.
- Automatic Light Adjustment - Automatic exposure adjustment is applied in EMEET HD webcam 1080p so that the streaming webcam can deliver stable image performance. EMEET C960 camera for computer also features color adjustment and exposure optimization to help you look your best. For optimal video quality, it is recommended to use the webcam in normal or well-lit environments and select suitable video settings in your application. Proper lighting helps achieve a clearer and more balanced image.
- Plug-and-Play & Upgraded USB Connectivity - New C960 webcam features both USB Type-A & A-to-C adapter connections for wider compatibility. For stable performance, connect the webcam directly to the computer's main USB port and ensure the device is recognized correctly. If a hub or docking station is used, please ensure it provides sufficient power and stable data transmission, as limited ports may affect performance. 90° wide-angle lens captures more participants without frequent adjustments.
- High Compatibility & Multi Application - C960 webcam for laptop is compatible with Windows 10/11, macOS 10.14+, and Android TV 7.0+. Not supported: Windows Hello, TVs, tablets, or game consoles. It works with Zoom, Teams, Facetime, Google Meet, YouTube and more. Please select C960 webcam as the default camera and microphone device in your application and ensure camera/microphone permissions are enabled, especially on macOS. (Tips: Incompatible with Windows Hello)
The image contains a dialog or another window
Graphics.CopyFromScreen copies desktop pixels. Move other windows away, keep the form unobstructed, or use a rendering technology designed for offscreen capture. There is no supported WebBrowser.DrawToBitmap fallback to hide the obstruction.
The page looks different on another computer
That is consistent with the control using the installed browser version. Record the operating-system and browser runtime environment when diagnosing differences, and test on every deployment configuration you support.
The page changes after the file is saved
DocumentCompleted marks navigation completion, not necessarily the end of delayed application activity. Add a page-specific readiness signal, a deliberate delay, or a visible-state check appropriate to your page. Avoid claiming deterministic output when the page has continuing animation or network work.
Best Value
The application hangs or leaks resources
Keep all control operations on the STA UI thread, avoid creating many controls concurrently, detach event handlers during shutdown, and dispose the control on that same thread. The WebBrowser control is resource-intensive.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
For repeatable screenshots from application code, ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP, or PDF. Before capture it accepts the cookie or consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers.
C# call
See the ScreenshotNeo documentation for authentication and options. This example saves the returned image:
using System;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
using var http = new HttpClient { Timeout = TimeSpan.FromSeconds(90) };
string target = "https://stripe.com";
string endpoint = "https://api.screenshotneo.com/v1/shot" +
"?access_key=YOUR_API_KEY&url=" +
Uri.EscapeDataString(target);
byte[] image = await http.GetByteArrayAsync(endpoint);
await File.WriteAllBytesAsync("shot.webp", image);
}
}
Equivalent cURL, Python, and Node.js calls
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Options for production workflows
- Full-page capture with lazy images loaded, element capture by CSS selector, dark mode, 12 device presets, arbitrary viewports, and retina scale.
- PDF output with paper size, margins, landscape mode, and page ranges.
- Custom CSS and JavaScript, click-before-capture, hide selectors, waits for a selector, delay, or network idle.
- Blocking for ads, trackers, requests, or resource types; custom headers, cookies, user agent, Authorization, timezone, and geolocation.
- Transparent backgrounds, image resizing, selectable cache TTL, signed links for public
<img>tags, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. - An MCP server with
take_screenshot,get_page_info, andcapture_pdftools for Claude, Cursor, and other MCP clients.
| Plan | Included screenshots | Price |
|---|---|---|
| Free | 1,000 per month | $0, no card |
| Starter | 3,000 | $5 |
| Growth | 15,000 | $15 |
| Pro | 60,000 | $39 |
| Scale | 250,000 | $99 |
| Business | 1,000,000 | $249 |
Yearly billing gives two months free, and every feature is available on every plan. Create a free ScreenshotNeo account for 1,000 screenshots a month with no card.
Frequently Asked Questions
Can this technique run safely as a Windows service?
Not as a drop-in assumption. The WinForms control requires an STA UI thread, an interactive rendering environment, and careful same-thread disposal. A service or unattended worker should use a capture technology documented for that hosting model instead of relying on desktop screen pixels.
Will a different image encoder fix WebBrowser capture?
No. PNG, JPEG, and bitmap pixel formats affect file encoding, not the unsupported WebBrowserBase.DrawToBitmap implementation. Choose the capture mechanism first, then choose an output format.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




