首页上一页 1 下一页尾页 1 条记录 1/1页
很急!在c#范例宝典(2)中第1章实例017(隐藏式窗体)问题
发表在C#图书答疑
2010-07-22
是否精华
是
否
版块置顶:
是
否
无法在 DLL“user32.dll”中找到名为“Getparent”的入口点?
#region 获取光标当前状态下控件的句柄
/// <summary>
/// 获取光标当前状态下控件的句柄
/// </summary>
/// <param name="X">当前光标的X的坐标</param>
/// <param name="Y">当前光标的Y的坐标</param>
/// <returns></returns>
public IntPtr MouseNowPosition(int x, int y)
{
IntPtr OriginalHandle;//声明保存原始句柄的变量
OriginalHandle=((IntPtr)WindowFromPoint(x,y));
CurrentHandle = OriginalHandle;
while (OriginalHandle != ((IntPtr)0))
{
CurrentHandle = OriginalHandle;
OriginalHandle = Getparent(CurrentHandle);
}
return CurrentHandle;
}
#endregion
#region 获取光标当前状态下控件的句柄
/// <summary>
/// 获取光标当前状态下控件的句柄
/// </summary>
/// <param name="X">当前光标的X的坐标</param>
/// <param name="Y">当前光标的Y的坐标</param>
/// <returns></returns>
public IntPtr MouseNowPosition(int x, int y)
{
IntPtr OriginalHandle;//声明保存原始句柄的变量
OriginalHandle=((IntPtr)WindowFromPoint(x,y));
CurrentHandle = OriginalHandle;
while (OriginalHandle != ((IntPtr)0))
{
CurrentHandle = OriginalHandle;
OriginalHandle = Getparent(CurrentHandle);
}
return CurrentHandle;
}
#endregion