Files
docs-desktop/dotnet-desktop-guide/framework/winforms/advanced/how-to-create-a-bitmap-at-run-time.md
T
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

1.2 KiB

title, description, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title description ms.date dev_langs helpviewer_keywords ms.assetid
How to: Create a Bitmap at Run Time Learn how to create a bitmap object and display it in an existing Windows Forms PictureBox control. 03/30/2017
csharp
vb
bitmaps [Windows Forms], creating
bitmaps [Windows Forms], examples [Visual Basic]
737bae30-e599-4e1d-bf30-bab8280b32be

How to: Create a Bitmap at Run Time

This example creates and draws in a xref:System.Drawing.Bitmap object and displays it in an existing Windows Forms xref:System.Windows.Forms.PictureBox control.

Example

[!code-csharpSystem.Drawing.CreateBitmapAtRuntime#1] [!code-vbSystem.Drawing.CreateBitmapAtRuntime#1]

Compiling the Code

This example requires:

  • A Windows Form that imports the System, System.Drawing and System.Windows.Forms assemblies.

See also