using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;namespace NV100C
{
[Guid("84ffd1ee-2e7c-4983-a6bd-1994c65c8d50")]
public partial class Hello : UserControl
{
public Hello()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
String s = "Hello, now is ";
this.label1.Text = s;
}
}
}
第一次尝试编写ocx控件,上面是其中一个页面的代码,编译的时候为什么会提示“System.Guid 不是属性类”的错误呢???
查看微软的文档说明:表示全局唯一标识符 (GUID)。
命名空间: System
程序集: mscorlib(在 mscorlib.dll 中)网上搜索了一下,都没人碰到这个问题,请问大家是哪里的问题啊?
解决方案 »
- C# 数组循环移动的问题,请教。。
- textbox在计算器中的应用问题
- 关于C#函数调用效率问题
- dataGridView控件邦定dataTable,当动态向dataTable添加数据时,当dataGridView需要使用滚动条时,程序会死
- 讨论委托之BeginInvoke(...)
- 我做的程序打包后,放到未装.net的机子上为何运行出错?
- 渐变进度条的问题,高分求救(再现等待!!!!!!!)
- asp页面如何调用.net页面
- 怎么计算两个DateTime变量之间相差多少个月阿
- 帮帮忙,有人回答这个问题吗
- C# winfrom上传图片到ftp空间报错,100分求解决,急。。。
- winform窗体显示的层次问题
using System.Runtime.InteropServices;因为Guid是属性,应该用的是System.Runtime.InteropServices.GuidAttribute而不是System.Guid