能让控件的汽泡提示主动弹出吗?
能让控件的汽泡提示主动弹出吗?也就是鼠标不放在控件上,汽泡也能出来
[解决办法]
很简单的,根本不用控件。
下面是头文件 .h
- C/C++ code
#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>//---------------------------------------class TForm1 : public TForm{__published: // IDE-managed Components TButton *Button1; void __fastcall Button1Click(TObject *Sender);private: // User declarations void __fastcall BalloonHint(String msg); //加上这句public: // User declarations __fastcall TForm1(TComponent* Owner);};//---------------------------------------extern PACKAGE TForm1 *Form1;//---------------------------------------#endif
[解决办法]
让某控件显示其自己的Hint:
- C/C++ code
TPoint pt = Button2->ClientToScreen(TPoint(Button2->Width / 2, Button2->Height / 2));::SetCursorPos(pt.x, pt.y) ;Application->ActivateHint(pt);
[解决办法]
楼主估计是不想让鼠标指针在控件上,如果指针不在控件上,又不会响应产生WM_NCMOUSEHOVER消息.