Quote:
>Hello, I encounter a problem of getting server time from
>a client program.
>I run a server program on one PC and a client program running
>on another PC will request the server's time. Suppose I've
>linked text1 (server) and text1(client) controls in LinkMode 1
>condition. Then in client program, I send
> text1.LinkExeccute Now
>In server program
>Sub Form_LinkExecute(CmdStr as String, Cancel as Integer)
> text1.Text = CmdStr
>End Sub
>And the server program did show the time in the text1 box.
>However, in the client program, I got error message:
> Foreign application won't perform DDE operation
>So how can I make it work correctly?
Hi,
Last week I encountered the same problem. The DDE command is passed
AND executed correctly, but I still got the error message "Foreign
application won't....'
I think the problem is that the function Form_LinkExecute on the
server expects TWO parameters, and it just gets one. However, from
within the client application I couldn't pass the second parameter.
To solve this problem I used the code on the client:
On Error resume next
text1.LinkExecute Now
On Error goto 0
I know it's not the most elegant sollution, but it works.
I hope this will help you.
Greetings - Roger Hoen