回复 5楼 吹水佬
不好意思,我是菜鸟,我再请教一下,在我的表单中如何利用您教给我的功能呢?
是否将:
DECLARE LONG SendMessage IN User32 LONG, LONG, LONG, LONG
_SCREEN.Visible = .F.
BINDEVENT(this.hWnd, 7, this, "_SetFocus")
BINDEVENT(this.hWnd, 8, this, "_KillFocus")
以上代码放入表单的INIT事件中,
然后剩下的部分:
FUNCTION _SetFocus(hWnd, nMsg, wParam, lParam)
this.Caption = this.name + "窗口获得焦点"
SendMessage(hWnd, nMsg, wParam, lParam)
ENDFUNC
FUNCTION _KillFocus(hWnd, nMsg, wParam, lParam)
this.Caption = this.name + "窗口失去焦点"
SendMessage(hWnd, nMsg, wParam, lParam)
ENDFUNC
如何在表单中调用呢?
也就是说我运行我的表单,然后用您的办法来实现,但我不知道如何在表单中实现,还请赐教,非常感谢!