事件?a执行片段中含可能触发的b事件(比如主动送消息),b事件响应的应该是个消息吧,所以,a做a的事,b响应相应的消息就可以了的。tform1.button1click(sender:tobject);
begin
dosomething;
if conditionB then
begin
postmessage(hbutton2,wm_mousedown,1,0);
processmessage;//让出处理器时间,非要等固定时间的话,可以sleep(time)再执行此操作
end;
else dosomeotherthing;
end;tform1.button2mousedown(.....);
begin
button2down processin...
end; end;
begin
dosomething;
if conditionB then
begin
postmessage(hbutton2,wm_mousedown,1,0);
processmessage;//让出处理器时间,非要等固定时间的话,可以sleep(time)再执行此操作
end;
else dosomeotherthing;
end;tform1.button2mousedown(.....);
begin
button2down processin...
end; end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货