🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11255

Re: Problems using "SwitchDesktop"

#11255
From: Remy Lebeau (TeamB)
Date: Fri, 20 Feb 2004 22:43
26 lines
2249 bytes
"Ted Byers" <r.ted.byers@sympatico.ca> wrote in message
news:40366f4a$1@newsgroups.borland.com...

> So, then, this code should go in function main, before the main form
> is created, and that the code to switch back to the original desktop
> and free the one I created should go in function main after the main
> form is closed and released.  Right?

That is one way to handle it, if your intent is to have your program only
running solely on the new desktop and then terminate when you switch back to
the main desktop.

There is a catch, though - if you are using the VCL, then the global
TApplication object has already created its own internal window before
main() is even entered.  That might effect how things behave, since the
TApplication window would be associated with the default desktop while the
actual MainForm would be associated with your custom desktop instead.  I
don't know enough about inter-desktop issues to know whether that will
actually be a problem or not.  In it turns out to be one, then you may have
to create two separate programs - one that creates the new desktop and
switches to it, and then spawns a separate application that runs entirely
under the new desktop from the beginning.


Gambit
Technical Details
Message-ID: <40368ba3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <403642b4$1@newsgroups.borland.com> <40366663$1@newsgroups.borland.com> <40366f4a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,90c150c625365b29
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-02-20 14:40:54 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <403642b4$1@newsgroups.borland.com> <40366663$1@newsgroups.borland.com> <40366f4a$1@newsgroups.borland.com>
Subject: Re: Problems using "SwitchDesktop"
Date: Fri, 20 Feb 2004 14:43:15 -0800
Lines: 28
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: 67.22.138.253
Message-ID: <40368ba3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1077316515 67.22.138.253 (20 Feb 2004 14:35:15 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail