| title | ms.custom | ms.date | ms.prod | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | manager | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
How to: Create a Bitmap at Run Time |
03/30/2017 |
.net-framework |
|
article |
|
|
737bae30-e599-4e1d-bf30-bab8280b32be |
7 |
dotnet-bot |
dotnetcontent |
wpickett |
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
xref:System.Drawing.Bitmap
Images, Bitmaps, and Metafiles