Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
Problems with COM-Server showing Forms
Hi there,
i've created a small com-server (Exe, Out-of-process), which has the task to enable another app to select, add or modify customer-adresses from my app and to return a customer-number to the calling app. But there are two problems which I need to solve.
The method getkundennr calls the form presenting the customer adresses:
procedure getkundennr
local nKundennr
nKundennr = 0
do form serverkunden to nKundennr
return nKundennr
Endproc
But this does not work. I get an error-message telling me that the form must be modal. But the form is modal. Who knows what it is is I am doing wrong.
The other problem is, that when I change the calling of the form for basic testing to "do form serverkunden", the form is in the foreground, but has not the focus. The second time I call the the procedure the form has focus.
I tried the api-function setforegroundwindow but without success.
What can I do?
Thanks in advance
Thomas
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement