Reputation: 293
I tried:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using AviFile;
using ScreenShotDemo;
using System.Threading;
using System.Windows.
In my new class but in the bottom system.Windows. There is no Media
Im using visual c# pro 2012 and .net 4.5 Tried to add it as reference looked for it in .net and in COM but it's not there.
The reason i need it is that in my code i have PixelFormat and it's not exist:
Bitmap bmpScreenShot = new Bitmap(currentScreen.Bounds.Width,
currentScreen.Bounds.Height,
PixelFormat.Format32bppArgb);
PixelFormat not exist.
Upvotes: 0
Views: 7289
Reputation: 187
I'm writing this answer to, like me, spent hours trying to find a using System.Windows.Media
, and can't get the BitmapImage. Just use the using Windows.UI.Xaml.Media.Imaging
. It works just fine.
Upvotes: 3
Reputation: 612
You need to add System.Drawing.Imaging to your using statements.
You can usually easily find what you need to include by right clicking on the item in question and choosing "Resolve"
Upvotes: 5