var

Ret: LongInt;
mText: PChar;
Buf: Integer;

sCode:string;

begin

sCode:='123213123';

GetMem(mText, Length(sCode));
StrCopy(mText, PChar(sCode));
Buf := LongInt(mText);
SendMessage(hand,WM_SETTEXT,0,Buf); //向主界面的文本框发送商品条码

PostMessage(hand, WM_KEYDOWN,VK_RETURN,0);//回车事件
PostMessage(hand, WM_KEYUP,VK_RETURN,0);

 

end;

 

posted on 2020-04-22 16:06  EEEEEEEEEEEEEEEEEEE  阅读(2679)  评论(0编辑  收藏  举报