To godgreat:那个方法在net2003中不能用TO hbxtlhx:我试试,后面是SystemIcons.Application;对吧?
TO hbxtlhx:我现在是建的一个PPC的类,没有Application,我加个窗体看看行不行
TO hbxtlhx:net精简版好像不支持。我试了,在windows程序下可以调用Handle,但做智能设备程序就出不来了
Icon.Handle 属性 [C#]请参见 Icon 类 | Icon 成员 | System.Drawing 命名空间 | Icon 成员(Visual J# 语法) | C++ 托管扩展编程 要求 平台: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 系列 语言 C#C++JScriptVisual Basic全部显示 获取此 Icon 对象的 Windows 句柄。这并非该句柄的副本;请不要释放它。[Visual Basic] Public ReadOnly Property Handle As IntPtr[C#] public IntPtr Handle {get;}[C++] public: __property IntPtr get_Handle();[JScript] public function get Handle() : IntPtr;属性值 该图标的 Windows 句柄。 //here 要求 平台: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 系列
{
System.Reflection.Assembly asm =
System.Reflection.Assembly.GetAssembly(typeof(com.ms.win32.wina));
Type t = asm.GetType("com.ms.win32.win" + char.ToLower(name[0]),
true);
System.Reflection.FieldInfo info = t.GetField(name);
return int.Parse(info.GetValue(null).ToString());
}
IntPtr handle = icon.Handle;
System.Drawing.Icon icon;
IntPtr handle = icon.Handle;也不行
报这样的错
IntPtr handle = icon.Handle;
Console.WriteLine(handle);输出为:
65539
Icon 类 | Icon 成员 | System.Drawing 命名空间 | Icon 成员(Visual J# 语法) | C++ 托管扩展编程
要求
平台: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 系列
语言
C#C++JScriptVisual Basic全部显示
获取此 Icon 对象的 Windows 句柄。这并非该句柄的副本;请不要释放它。[Visual Basic]
Public ReadOnly Property Handle As IntPtr[C#]
public IntPtr Handle {get;}[C++]
public: __property IntPtr get_Handle();[JScript]
public function get Handle() : IntPtr;属性值
该图标的 Windows 句柄。
//here
要求
平台: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 系列