子窗体怎么点击按钮触发父窗体的MouseDown事件

asdjkjk123456 2011-12-31 02:12:32
RT,子窗体点击按钮时,就已经触发了MouseDown,其实我想重新在父窗体上触发MouseDown该怎么做,就是还得按一下鼠标才触发事件,谢谢!
...全文
93 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
cfvgodot 2011-12-31
  • 打赏
  • 举报
回复
委托实现

http://topic.csdn.net/u/20110331/17/08451c7b-d9af-4a94-882c-84e81dab2efc.html
  • 打赏
  • 举报
回复
LZ你的结贴率
sdl2005lyx 2011-12-31
  • 打赏
  • 举报
回复
用API函数:


[DllImport("user32.dll", EntryPoint = "FindWindowEx")]
public static extern IntPtr FindWindowEx(IntPtr hWnd1, int hWnd2, string lpsz1, string lpsz2);


[DllImport("user32.dll", EntryPoint = "SendMessage")]
public static extern int SendMessage(
IntPtr hwnd,
int wMsg,
int wParam,
int lParam
);

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧