DDE LinkExecute question 
Author Message
 DDE LinkExecute question

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 method or operation.

So how can I make it work correctly?

Any suggestion will be appreciated.

Han
--
Han-Wen Hsiao
Department of Civil Engineering



Mon, 31 Aug 1998 03:00:00 GMT  
 DDE LinkExecute question

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



Sat, 05 Sep 1998 03:00:00 GMT  
 DDE LinkExecute question

Quote:
>Sub Form_LinkExecute(CmdStr as String, Cancel as Integer)
>   text1.Text = CmdStr

You need to set Cancel to Zero here. Cancel is by default non-zero.

Quote:
>End Sub


--
Newbiehood is not a period of time, it's a way of life.

http://www.sn.no/~balchen/
ftp://ftp.sn.no/user/balchen/



Sun, 06 Sep 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Return values with DDE LinkExecute

2. How do I get returned value with LINKEXECUTE in VB4 DDE

3. problem with LinkExecute with DDE

4. Help with DDE LinkExecute Command

5. LinkExecute method in LinkExecute event?

6. LinkExecute completion

7. Help getting returned value after a LINKEXECUTE command

8. MousePointer control during LinkExecute??

9. VB to Excel 5 - LinkExecute Syntax????

10. HELP Urgently Needed - LinkExecute Method

11. HELP Urgently Needed - LinkExecute Method

12. Excel VB DDE to VC++ DDE server in NT

 

 
Powered by phpBB® Forum Software