procedure TForm1.MyMessageProc(var msg: TWmCopyData);
var
str:string;
begin
try
str:= StrPas(msg.CopyDataStruct.lpData); ''''着段怎么写成vb的
if copy(str,1,5)='state' then
begin
Label1.Caption:= '接收器状态:'+copy(str,6,length(str)-5); end
else
begin
if copy(str,1,5)='admin' then
begin
Label1.Caption:='命令:'+copy(str,6,length(str)-5);
end
else
begin
Memo.Lines.Add(copy(str,2,length(str)-1)+#13);
end;
end;
except
end;
end;着段怎么写成vb的
着段怎么写成vb的
var
str:string;
begin
try
str:= StrPas(msg.CopyDataStruct.lpData); ''''着段怎么写成vb的
if copy(str,1,5)='state' then
begin
Label1.Caption:= '接收器状态:'+copy(str,6,length(str)-5); end
else
begin
if copy(str,1,5)='admin' then
begin
Label1.Caption:='命令:'+copy(str,6,length(str)-5);
end
else
begin
Memo.Lines.Add(copy(str,2,length(str)-1)+#13);
end;
end;
except
end;
end;着段怎么写成vb的
着段怎么写成vb的
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
(hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)
Dim buf(1 To 255) As Byte Call CopyMemory(buf(1), ByVal msg.CopyDataStruct.lpData, msg.CopyDataStruct.cbData)
a$ = StrConv(buf, vbUnicode)
a$ = Left$(a$, InStr(1, a$, Chr$(0)) - 1)
Form1.Print a$
就是大概用上面那些代碼修改了!!