我试过了:
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.在我的新类中,但在底部的system.Windows中。没有媒体
我正在使用visual c# pro 2012和.net 4.5试图添加它作为参考在.net和COM中查找它,但它不在那里。
我需要它的原因是在我的代码中有PixelFormat,但它并不存在:
Bitmap bmpScreenShot = new Bitmap(currentScreen.Bounds.Width,
currentScreen.Bounds.Height,
PixelFormat.Format32bppArgb);PixelFormat不存在。
发布于 2013-04-18 23:26:58
您需要将System.Drawing.Imaging添加到using语句中。
您通常可以通过右键单击有问题的项目并选择"Resolve“来轻松找到需要包含的内容
发布于 2014-11-23 11:38:00
我和我一样,花了几个小时试图找到using System.Windows.Media,但找不到BitmapImage,所以我写了这个答案。只需使用using Windows.UI.Xaml.Media.Imaging即可。它工作得很好。
发布于 2013-04-18 23:26:18
System.Windows.Media需要引用PresentationCore.dll和
Pixelformat需要引用System.Drawing.dll。
请参见reference here。
https://stackoverflow.com/questions/16086966
复制相似问题