Timer控件依赖WM_TIMER消息,控制台程序中若无消息循环是不能用此控件的.
换句话说,你要用此控件需自己写消息循环.如:
While GetMessage(msg) do
begin
translateMessage(msg);
DispatchMessage(msg);
end;
这样程序收到WM_TIMER消息后就会触发ontimer事件了.
换句话说,你要用此控件需自己写消息循环.如:
While GetMessage(msg) do
begin
translateMessage(msg);
DispatchMessage(msg);
end;
这样程序收到WM_TIMER消息后就会触发ontimer事件了.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货