Article View: borland.public.cppbuilder.nativeapi
Article #15132Services interaction with "Remote Desktop Connection" (Terminal services)
From: Douglas Stites
Date: Wed, 16 Jul 2003 11:03
Date: Wed, 16 Jul 2003 11:03
51 lines
2475 bytes
2475 bytes
I have developed a service which places a tray-icon on the desktop such that
when you double click it
it makes a user interface visible. This runs fine on the desktop, but when
I use Remote Desktop Connection
(terminal services) to connect, the icon does note show.
void __fastcall TAGService::Timer2Timer(TObject *Sender)
{
if( FindWindow("Progman", 0) )
{
AddTrayIcon();
}
}
Also, the "FindWindow" API finds the application from the desk top, but not
from the Remote connection.
HWND h1=NULL;
h1 = FindWindow("TfCommServer", 0);
if (h1 == NULL)
{ SetServerHandles = true; //We must set handles again
StatusBar1->Panels->Items[2]->Text="Local AGServer not
available!";
return false;
}
finally, I put in a message to show the form from an application running on
the remote connection, the user interface
becomes visible on the regular desktop
if (cmd == "!visible")
{ found = true; GiveResponse=false;
PassNotReqd=true;
PostMessage( Handle, WM_SERVICE_SHOW, 0, 0 );
}
I need to understand how to have the application/service to interact with
the remote desktop connection
thanks in advance
doug
Technical Details
Message-ID:
<3f153071$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-05!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,23202d902a99fa8a,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-16 04:10:07 PST Reply-To: "Douglas Stites" <doug@stites.org> From: "Douglas Stites" <doug@stites.org> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Services interaction with "Remote Desktop Connection" (Terminal services) Date: Wed, 16 Jul 2003 07:03:18 -0400 Lines: 53 Organization: INMARK X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 12.129.244.216 Message-ID: <3f153071$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1058353265 12.129.244.216 (16 Jul 2003 04:01:05 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-05!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail