PB发送和接收消息send SendMessage
1.用PB自带的SEND函数发送消息 传字符:Send(Handle(w_main),1600,0,'dfdfd') 传LONG:Send(Handle(w_main),1600,0,123)
2.用API发送LONG类型消息,申明:
Function long SendMessage(long hwnd,long wMsg,long wParam,long lParam) Library "user32.dll" Alias for "SendMessageA"
发送:SendMessage(Handle(w_main),1600,0,123)
接收方法:
Other事件代码:
if message.number=1600 then
string ls_tmp
ls_tmp=string(message.LongParm)
messagebox("",ls_tmp)
end if