0

这是我班上的代码:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.IO;
using System.Drawing.Imaging;

namespace Magnifier20070401
{
    public partial class MagnifierForm : Form
    {
        public MagnifierForm(Configuration configuration, Point startPoint)
        {
            InitializeComponent();

            //--- My Init ---
            mConfiguration = configuration;
            FormBorderStyle = FormBorderStyle.None;

            ShowInTaskbar = mConfiguration.ShowInTaskbar;
            TopMost = mConfiguration.TopMostWindow;
            Width = mConfiguration.MagnifierWidth;
            Height = mConfiguration.MagnifierHeight;

            // Make the window (the form) circular
            GraphicsPath gp = new GraphicsPath();
            gp.AddEllipse(ClientRectangle);
            Region = new Region(gp);

            mImageMagnifier = Properties.Resources.magnifierGlass;

在我得到的属性上:错误 1 ​​当前上下文中不存在名称“属性”

我将此表单作为现有项目添加到我的项目中,并且在此属性上出现错误。我在资源中有 magnifierGlass 图像。

4

1 回答 1

0

发现需要在属性前添加我的项目名称:

mImageMagnifier = ScreenVideoRecorder.Properties.Resources.magnifierGlass;

现在它正在工作,谢谢。

于 2013-04-15T13:34:43.197 回答